Skip to content

Commit dfda1c6

Browse files
committed
v0.7.13
- Fixed the line break issue in key.meta - Fixed the problem of static content loss caused by clearing the screen - Optimized the IDE connection experience
1 parent 963e111 commit dfda1c6

17 files changed

Lines changed: 446 additions & 172 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,9 @@ jobs:
5656
5757
### What's New
5858
59-
- The ink framework has been upgraded from 5.2.1 to 7.0.1
60-
- Added command parameter hints and Tab completion
61-
- Refactored IDE connection logic to support active disconnection
62-
- Optimized system prompt adjustment workflow to enhance user experience
63-
- snow -c supports adding sessionId to restore a specific session
64-
- Default streaming display scheme enabled
65-
- Fixed known bugs to improve stability
59+
- Fixed the line break issue in key.meta
60+
- Fixed the problem of static content loss caused by clearing the screen
61+
- Optimized the IDE connection experience
6662
6763
### Installation
6864
```bash

package-lock.json

Lines changed: 43 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snow-ai",
3-
"version": "0.7.12",
3+
"version": "0.7.13",
44
"description": "Agentic coding in your terminal",
55
"license": "MIT",
66
"bin": {
@@ -90,7 +90,7 @@
9090
"https-proxy-agent": "^7.0.6",
9191
"iconv-lite": "^0.7.2",
9292
"ignore": "^7.0.5",
93-
"ink": "^7.0.1",
93+
"ink": "^6.8.0",
9494
"ink-gradient": "^4.0.0",
9595
"ink-select-input": "^6.2.0",
9696
"ink-spinner": "^5.0.0",

source/hooks/conversation/useCommandHandler.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ type CommandHandlerOptions = {
427427
setShowDiffReviewPanel: React.Dispatch<React.SetStateAction<boolean>>;
428428
setShowPermissionsPanel: React.Dispatch<React.SetStateAction<boolean>>;
429429
setShowBranchPanel: React.Dispatch<React.SetStateAction<boolean>>;
430+
setShowIdeSelectPanel: React.Dispatch<React.SetStateAction<boolean>>;
430431
setShowNewPromptPanel: React.Dispatch<React.SetStateAction<boolean>>;
431432
setShowBackgroundPanel: () => void;
432433
onSwitchProfile: () => void;
@@ -529,23 +530,11 @@ export function useCommandHandler(options: CommandHandlerOptions) {
529530
return;
530531
}
531532

532-
// Handle /ide command
533+
// Handle /ide command — open selection panel
533534
if (commandName === 'ide') {
534-
if (result.success) {
535-
if (result.action === 'disconnect') {
536-
options.setVscodeConnectionStatus('disconnected');
537-
} else {
538-
options.setVscodeConnectionStatus('connected');
539-
}
540-
} else {
541-
options.setVscodeConnectionStatus('disconnected');
535+
if (result.success && result.action === 'showIdeSelectPanel') {
536+
options.setShowIdeSelectPanel(true);
542537
}
543-
const commandMessage: Message = {
544-
role: 'command',
545-
content: result.message || '',
546-
commandName,
547-
};
548-
options.setMessages(prev => [...prev, commandMessage]);
549538
return;
550539
}
551540

source/hooks/input/useKeyboardInput.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,20 @@ export function useKeyboardInput(options: KeyboardInputOptions) {
535535
return;
536536
}
537537

538+
// Ctrl+Enter (Win/Linux) or Option+Enter (macOS) - Insert newline
539+
// Must be checked before any picker/panel key.return handlers to avoid interception
540+
if ((key.ctrl || key.meta) && key.return) {
541+
flushPendingInput();
542+
buffer.insert('\n');
543+
const text = buffer.getFullText();
544+
const cursorPos = buffer.getCursorPosition();
545+
updateCommandPanelState(text);
546+
updateFilePickerState(text, cursorPos);
547+
updateAgentPickerState(text, cursorPos);
548+
updateRunningAgentsPickerState(text, cursorPos);
549+
return;
550+
}
551+
538552
// Handle escape key for double-ESC history navigation
539553
if (key.escape) {
540554
if (showArgsPicker) {
@@ -1453,19 +1467,6 @@ export function useKeyboardInput(options: KeyboardInputOptions) {
14531467
}
14541468
}
14551469

1456-
// Ctrl+Enter - Insert newline
1457-
if (key.ctrl && key.return) {
1458-
flushPendingInput();
1459-
buffer.insert('\n');
1460-
const text = buffer.getFullText();
1461-
const cursorPos = buffer.getCursorPosition();
1462-
updateCommandPanelState(text);
1463-
updateFilePickerState(text, cursorPos);
1464-
updateAgentPickerState(text, cursorPos);
1465-
updateRunningAgentsPickerState(text, cursorPos);
1466-
return;
1467-
}
1468-
14691470
// Enter - submit message or insert newline after '/'
14701471
if (key.return) {
14711472
flushPendingInput();

source/hooks/ui/usePanelState.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export type PanelState = {
2828
showNewPromptPanel: boolean;
2929
showTodoListPanel: boolean;
3030
showPixelEditor: boolean;
31+
showIdeSelectPanel: boolean;
3132
connectionPanelApiUrl?: string;
3233
profileSelectedIndex: number;
3334
profileSearchQuery: string;
@@ -57,6 +58,7 @@ export type PanelActions = {
5758
setShowDiffReviewPanel: Dispatch<SetStateAction<boolean>>;
5859
setShowTodoListPanel: Dispatch<SetStateAction<boolean>>;
5960
setShowPixelEditor: Dispatch<SetStateAction<boolean>>;
61+
setShowIdeSelectPanel: Dispatch<SetStateAction<boolean>>;
6062
setProfileSelectedIndex: Dispatch<SetStateAction<number>>;
6163
setProfileSearchQuery: Dispatch<SetStateAction<string>>;
6264
handleSwitchProfile: (options: {
@@ -94,6 +96,7 @@ export function usePanelState(): PanelState & PanelActions {
9496
const [showNewPromptPanel, setShowNewPromptPanel] = useState(false);
9597
const [showTodoListPanel, setShowTodoListPanel] = useState(false);
9698
const [showPixelEditor, setShowPixelEditor] = useState(false);
99+
const [showIdeSelectPanel, setShowIdeSelectPanel] = useState(false);
97100
const [connectionPanelApiUrl, setConnectionPanelApiUrl] = useState<
98101
string | undefined
99102
>(undefined);
@@ -134,6 +137,7 @@ export function usePanelState(): PanelState & PanelActions {
134137
showNewPromptPanel ||
135138
showTodoListPanel ||
136139
showPixelEditor ||
140+
showIdeSelectPanel ||
137141
options.hasPendingRollback ||
138142
options.hasPendingToolConfirmation ||
139143
options.hasPendingUserQuestion ||
@@ -270,6 +274,11 @@ export function usePanelState(): PanelState & PanelActions {
270274
return false; // Let PixelEditorScreen handle ESC
271275
}
272276

277+
if (showIdeSelectPanel) {
278+
setShowIdeSelectPanel(false);
279+
return true;
280+
}
281+
273282
return false; // ESC not handled
274283
};
275284

@@ -295,7 +304,8 @@ export function usePanelState(): PanelState & PanelActions {
295304
showConnectionPanel ||
296305
showNewPromptPanel ||
297306
showTodoListPanel ||
298-
showPixelEditor
307+
showPixelEditor ||
308+
showIdeSelectPanel
299309
);
300310
};
301311

@@ -322,6 +332,7 @@ export function usePanelState(): PanelState & PanelActions {
322332
showNewPromptPanel,
323333
showTodoListPanel,
324334
showPixelEditor,
335+
showIdeSelectPanel,
325336
connectionPanelApiUrl,
326337
profileSelectedIndex,
327338
profileSearchQuery,
@@ -348,6 +359,7 @@ export function usePanelState(): PanelState & PanelActions {
348359
setShowNewPromptPanel,
349360
setShowTodoListPanel,
350361
setShowPixelEditor,
362+
setShowIdeSelectPanel,
351363
setConnectionPanelApiUrl,
352364
setProfileSelectedIndex,
353365
setProfileSearchQuery,

0 commit comments

Comments
 (0)