Skip to content

Commit ed497c0

Browse files
committed
Enhance AppStatusBar with new stop generation button and update shortcuts settings
1 parent c7aed25 commit ed497c0

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

src/renderer/src/coder/AppStatusBar.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Pointer, PointerOff, Square } from 'lucide-react'
1+
import { Pointer, PointerOff, OctagonX } from 'lucide-react'
22
import { useSolutionStore } from '@/lib/store/solution'
33
import { useShortcutsStore } from '@/lib/store/shortcuts'
44
import { useAppStore } from '@/lib/store/app'
@@ -22,15 +22,20 @@ export function AppStatusBar() {
2222
<div className="flex items-center space-x-2">
2323
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-r-2 border-[currentColor]"></div>
2424
<span className="text-sm">正在生成...</span>
25-
<Button
26-
variant="secondary"
27-
size="sm"
28-
className="h-6 px-2 text-xs"
29-
onClick={handleStop}
30-
>
31-
<Square className="w-3 h-3 mr-1" />
32-
停止生成
33-
</Button>
25+
<div className="fixed bottom-4 left-1/2 -translate-x-1/2 flex justify-center z-50 pointer-events-none">
26+
<Button
27+
variant="secondary"
28+
className="h-8 px-4 text-base shadow-lg pointer-events-auto"
29+
onClick={handleStop}
30+
>
31+
<OctagonX className="w-4 h-4" />
32+
停止生成
33+
<ShortcutRenderer
34+
shortcut={shortcuts.stopSolutionStream.key}
35+
className="inline-block border bg-transparent py-0 px-1"
36+
/>
37+
</Button>
38+
</div>
3439
</div>
3540
)}
3641
</div>

src/renderer/src/settings/CustomShortcuts.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export function CustomShortcuts() {
7070
<div className="space-y-2">
7171
<h3 className="text-sm text-gray-500">截图与AI</h3>
7272
<Shortcut label="截图" shortcut="takeScreenshot" />
73+
<Shortcut label="停止生成" shortcut="stopSolutionStream" />
7374
</div>
7475

7576
{/* Navigation */}
@@ -87,11 +88,6 @@ export function CustomShortcuts() {
8788
<Shortcut label="向左移动窗口" shortcut="moveMainWindowLeft" />
8889
<Shortcut label="向右移动窗口" shortcut="moveMainWindowRight" />
8990
</div>
90-
{/* AI 控制 */}
91-
<div className="space-y-2">
92-
<h3 className="text-sm text-gray-500">AI 控制</h3>
93-
<Shortcut label="停止生成" shortcut="stopSolutionStream" />
94-
</div>
9591
</div>
9692
</ShortcutsContext.Provider>
9793
)

0 commit comments

Comments
 (0)