Skip to content

Commit b6f29c4

Browse files
committed
feat:「追加截图」相关提示优化
1 parent 12920b1 commit b6f29c4

5 files changed

Lines changed: 53 additions & 19 deletions

File tree

src/renderer/src/coder/AppStatusBar.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export function AppStatusBar() {
5151
}
5252

5353
// Check if there's an active conversation
54-
const hasActiveConversation = screenshotData && solutionChunks.length > 0 && !isReceivingSolution
54+
const hasActiveConversation = screenshotData && solutionChunks.length > 0
5555

5656
return (
5757
<div className="absolute bottom-0 flex items-center justify-between w-full text-blue-100 bg-gray-600/10 px-4 pb-1">
5858
<div>
59-
{isReceivingSolution && (
59+
{isReceivingSolution ? (
6060
<div className="flex items-center space-x-2">
6161
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-r-2 border-[currentColor]"></div>
6262
<span className="text-sm">正在生成...</span>
@@ -75,11 +75,28 @@ export function AppStatusBar() {
7575
</Button>
7676
</div>
7777
</div>
78-
)}
78+
) : hasActiveConversation ? (
79+
<div className="flex items-center space-x-2 pointer-events-none opacity-50 text-sm gap-1">
80+
<span>
81+
<ShortcutRenderer
82+
shortcut="Shift+Alt+Enter"
83+
className="inline-block scale-75 text-xs border border-current bg-transparent py-0 px-1 ml-1"
84+
/>
85+
追加截图
86+
</span>
87+
<span>
88+
<ShortcutRenderer
89+
shortcut="Alt+Enter"
90+
className="inline-block scale-75 text-xs border border-current bg-transparent py-0 px-1"
91+
/>
92+
新开对话
93+
</span>
94+
</div>
95+
) : null}
7996
</div>
8097
<div className="flex items-center space-x-4 select-none">
8198
{/* Follow-up Question Button */}
82-
{hasActiveConversation && (
99+
{hasActiveConversation && !isReceivingSolution && (
83100
<Button
84101
variant="ghost"
85102
size="sm"

src/renderer/src/help/FAQ.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@ import { HelpSection } from './components'
55
const faqs = [
66
{
77
question: '如何截取屏幕截图?',
8-
answer: '按下 Alt+Enter 或 ⌥↵ 快捷键即可截取当前屏幕的截图。截图会自动显示在应用中。'
8+
answer: (
9+
<span>
10+
按下
11+
<ShortcutRenderer shortcut="Alt+Enter" className="text-xs mx-1" />
12+
快捷键即可截取当前屏幕的截图。截图会自动显示在应用中。
13+
</span>
14+
)
15+
},
16+
{
17+
question: '如何处理题目超过一屏的情况?',
18+
answer: (
19+
<span>
20+
按下
21+
<ShortcutRenderer shortcut="Alt+Shift+Enter" className="text-xs mx-1" />
22+
快捷键即可在当前对话中追加截图并生成解题建议。
23+
</span>
24+
)
925
},
1026
{
1127
question: '分享屏幕时,对方能看到应用吗?',

src/renderer/src/help/Shortcuts.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ const getShortcutDescription = (action: string) => {
5757
const descriptionMap: Record<string, string> = {
5858
hideOrShowMainWindow: '隐藏/显示窗口',
5959
ignoreOrEnableMouse: '鼠标穿透(窗口对鼠标隐身)',
60-
takeScreenshot: '截图并生成解题建议',
60+
takeScreenshot: '截图并生成解题建议(会新开对话)',
61+
appendScreenshot: '追加截图并生成解题建议',
62+
stopSolutionStream: '停止生成',
6163
pageUp: '向上翻页',
6264
pageDown: '向下翻页',
6365
moveMainWindowUp: '向上移动窗口',

src/renderer/src/help/index.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Info
1010
} from 'lucide-react'
1111
import { Button } from '@/components/ui/button'
12+
import ShortcutRenderer from '@/components/ShortcutRenderer'
1213
import { HelpSection } from './components'
1314
import { Shortcuts } from './Shortcuts'
1415
import { FAQ } from './FAQ'
@@ -74,17 +75,7 @@ export default function HelpPage() {
7475
<h3 className="font-semibold mb-2">1. 截取屏幕截图</h3>
7576
<p className="text-sm text-gray-700">
7677
当您需要分析某个问题时,按下快捷键{' '}
77-
<span>
78-
<kbd className="bg-gray-200 rounded p-1">Alt</kbd>+
79-
<kbd className="bg-gray-200 rounded p-1">Enter</kbd>
80-
<span className="text-xs"> (Windows)</span>
81-
</span>{' '}
82-
/{' '}
83-
<span>
84-
<kbd className="bg-gray-200 rounded p-1"></kbd>+
85-
<kbd className="bg-gray-200 rounded p-1"></kbd>
86-
<span className="text-xs"> (Mac)</span>
87-
</span>{' '}
78+
<ShortcutRenderer shortcut="Alt+Enter" className="text-xs mx-1" />
8879
截取当前屏幕。截图会立即显示在应用中。
8980
</p>
9081
</div>

src/renderer/src/settings/CustomShortcuts.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,17 @@ export function CustomShortcuts() {
6969
{/* Screenshot & AI */}
7070
<div className="space-y-2">
7171
<h3 className="text-sm text-gray-500">截图与AI</h3>
72-
<Shortcut label="截图" shortcut="takeScreenshot" />
72+
<Shortcut
73+
label="截图"
74+
description="截图并生成解题建议(会新开对话)"
75+
shortcut="takeScreenshot"
76+
/>
77+
<Shortcut
78+
label="追加截图"
79+
description="在当前对话中追加截图并生成解题建议,适用于长题目等场景"
80+
shortcut="appendScreenshot"
81+
/>
7382
<Shortcut label="停止生成" shortcut="stopSolutionStream" />
74-
<Shortcut label="追加截图 (长题目)" shortcut="appendScreenshot" />
7583
</div>
7684

7785
{/* Navigation */}

0 commit comments

Comments
 (0)