-
-
Notifications
You must be signed in to change notification settings - Fork 902
loosen up the requirements to show the File Browser in term context menu #3232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -397,6 +397,14 @@ export function bufferLinesToText(buffer: TermTypes.IBuffer, startIndex: number, | |
| return lines; | ||
| } | ||
|
|
||
| export function isLikelyOnSameHost(lastCommand: string): boolean { | ||
| if (lastCommand == null) { | ||
| return true; | ||
| } | ||
| const cmd = lastCommand.trimStart(); | ||
| return !cmd.startsWith("ssh "); | ||
| } | ||
|
Comment on lines
+400
to
+406
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heuristic has known blind spots — worth documenting. The check only matches a leading literal
Given the function is named 🤖 Prompt for AI Agents |
||
|
|
||
| export function quoteForPosixShell(filePath: string): string { | ||
| return "'" + filePath.replace(/'/g, "'\\''") + "'"; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 5605
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2535
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 4568
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 947
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 926
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2348
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2234
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1482
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 3322
Guard against a null
lastCommandAtom.this.termRef?.current?.lastCommandAtomcan beundefinediftermRef.currentisn't set yet or theTermWraphasn't initialized its atoms.globalStore.get(undefined)will throw, breaking the context menu. Other code sites (e.g.,tabrpcclient.tsline 165) explicitly guard against this pattern.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents