refactor: adjust some placeholder/prompt text (#530)

This commit is contained in:
sigoden 2024-05-21 08:06:57 +08:00 committed by GitHub
parent 2174dc055f
commit 91a06543b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 13 deletions

View File

@ -322,13 +322,13 @@
.toast {
display: none;
position: fixed;
top: 0;
top: 2px;
left: 50%;
text-align: center;
transform: translate(-50%, 0);
background-color: var(--fg-default);
background-color: rgba(0, 0, 0, 0.7);
color: var(--bg-primary);
padding: 1rem;
padding: 0.5rem;
border-radius: 0.3rem;
z-index: 9999;
}
@ -478,7 +478,7 @@
<div class="input-panel">
<div class="input-panel-inner">
<textarea id="chat-input" x-model="input" x-ref="input" @keydown.enter="handleEnterKeydown"
placeholder="Enter to send, Shift + Enter to wrap"></textarea>
placeholder="Ask Anything"></textarea>
<div class="input-image-bar" x-show="images.length > 0">
<template x-for="(image, index) in images">
<div class="input-image-item">

View File

@ -401,13 +401,12 @@
.toast {
display: none;
position: fixed;
top: 0;
left: 50%;
bottom: 1rem;
left: 1rem;
text-align: center;
transform: translate(-50%, 0);
background-color: var(--fg-default);
background-color: rgba(0, 0, 0, 0.7);
color: var(--bg-primary);
padding: 1rem;
padding: 0.5rem;
border-radius: 0.3rem;
z-index: 9999;
}
@ -634,7 +633,7 @@
<div class="input-panel">
<div class="input-panel-inner">
<textarea id="chat-input" x-model="input" x-ref="input" @keydown.enter="handleEnterKeydown"
placeholder="Enter to send, Shift + Enter to wrap"></textarea>
placeholder="Ask Anything"></textarea>
<div class="input-image-bar" x-show="images.length > 0">
<template x-for="(image, index) in images">
<div class="input-image-item">

View File

@ -225,7 +225,7 @@ async fn shell_execute(config: &GlobalConfig, shell: &Shell, mut input: Input) -
loop {
let answer = Select::new(
eval_str.trim(),
vec!["✅ Execute", "🤔 Revise", "📙 Explain", "❌ Cancel"],
vec!["✅ Execute", "🔄️ Revise", "📖 Explain", "❌ Cancel"],
)
.prompt()?;
@ -237,13 +237,13 @@ async fn shell_execute(config: &GlobalConfig, shell: &Shell, mut input: Input) -
process::exit(code);
}
}
"🤔 Revise" => {
"🔄️ Revise" => {
let revision = Text::new("Enter your revision:").prompt()?;
let text = format!("{}\n{revision}", input.text());
input.set_text(text);
return shell_execute(config, shell, input).await;
}
"📙 Explain" => {
"📖 Explain" => {
let role = config.read().retrieve_role(EXPLAIN_SHELL_ROLE)?;
let input = Input::from_str(config, &eval_str, Some(InputContext::role(role)));
let abort = create_abort_signal();