Conversation
|
💡 To request a new review, comment |
| } catch (error: any) { | ||
| const errorMessage = `Bash command failed: ${error?.message || String(error)}`; | ||
| services.chatHistory.addToolResult(toolCallId, errorMessage, "error"); | ||
| } |
There was a problem hiding this comment.
Bash execution lacks a cancellation path; command continues running after user interrupt, leading to orphaned processes and inconsistent UI state
Prompt for AI agents
Address the following comment on extensions/cli/src/ui/hooks/useChat.ts at line 374:
<comment>Bash execution lacks a cancellation path; command continues running after user interrupt, leading to orphaned processes and inconsistent UI state</comment>
<file context>
@@ -339,6 +339,52 @@ export function useChat({
+ services.chatHistory.updateToolStatus(toolCallId, "calling");
+
+ // Execute the bash command asynchronously - don't block UI
+ (async () => {
+ try {
+ const { runTerminalCommandTool } = await import("../../tools/runTerminalCommand.js");
</file context>
There was a problem hiding this comment.
I took a pass at this but decided worth doing on another PR. have opened a linear ticket for it
|
This would be a great feature for the vscode and IntelliJ extensions as well. Save having to use the terminal and then pull the context back in using @Terminal. |
tingwai
left a comment
There was a problem hiding this comment.
Just tested locally, love it!
|
🎉 This PR is included in version 1.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Adds a "shell mode" that users can enter using "!". Runs as a Bash tool invocation for now.
CON-3795
Summary by cubic
Add a shell mode to the CLI: start input with "!" to run shell commands directly from the chat with instant tool-call feedback. Addresses CON-3345 by enabling quick terminal commands without leaving the TUI.