doc: enhance shell integration error messages

Add descriptive messages to shell integration failures to help users
understand and resolve integration issues more effectively. This improves
the debugging experience by providing specific details about why shell
integration failed.

- Add message parameter to no_shell_integration event
- Update UI to display specific error messages
- Update troubleshooting documentation link

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
Eric Wheeler 2025-03-08 17:51:48 -08:00
parent 7dadf4cd1b
commit a867595a6a
4 changed files with 18 additions and 10 deletions

View file

@ -986,8 +986,8 @@ export class Cline {
exitDetails = details
})
process.once("no_shell_integration", async () => {
await this.say("shell_integration_warning")
process.once("no_shell_integration", async (message: string) => {
await this.say("shell_integration_warning", message)
})
await process

View file

@ -156,7 +156,10 @@ export class Terminal {
})
.catch(() => {
console.log("[Terminal] Shell integration not available. Command execution aborted.")
process.emit("no_shell_integration")
process.emit(
"no_shell_integration",
"Shell integration initialization sequence '\\x1b]633;A' was not received within 4 seconds. Shell integration has been disabled for this terminal instance.",
)
})
})

View file

@ -102,7 +102,7 @@ export interface TerminalProcessEvents {
continue: []
completed: [output?: string]
error: [error: Error]
no_shell_integration: []
no_shell_integration: [message: string]
/**
* Emitted when a shell execution completes
* @param id The terminal ID
@ -387,7 +387,10 @@ export class TerminalProcess extends EventEmitter<TerminalProcessEvents> {
console.warn(
"[TerminalProcess] Shell integration not available. Command sent without knowledge of response.",
)
this.emit("no_shell_integration")
this.emit(
"no_shell_integration",
"Command was submitted; output is not available, as shell integration is inactive.",
)
// unknown, but trigger the event
this.emit(

View file

@ -706,12 +706,14 @@ export const ChatRowContent = ({
</span>
</div>
<div>
Roo won't be able to view the command's output. Please update VSCode (
<code>CMD/CTRL + Shift + P</code> "Update") and make sure you're using a supported
shell: zsh, bash, fish, or PowerShell (<code>CMD/CTRL + Shift + P</code>
"Terminal: Select Default Profile").{" "}
<strong>{message.text}</strong>
<br />
<br />
Please update VSCode (<code>CMD/CTRL + Shift + P</code> "Update") and make sure
you're using a supported shell: zsh, bash, fish, or PowerShell (
<code>CMD/CTRL + Shift + P</code> "Terminal: Select Default Profile").{" "}
<a
href="https://github.com/cline/cline/wiki/Troubleshooting-%E2%80%90-Shell-Integration-Unavailable"
href="http://docs.roocode.com/troubleshooting/shell-integration/"
style={{ color: "inherit", textDecoration: "underline" }}>
Still having trouble?
</a>