minor cleanup for background processes and prompt

This commit is contained in:
chezsmithy 2025-04-17 23:18:05 -07:00
parent 3578aa62b7
commit 3e436448ab
2 changed files with 2 additions and 1 deletions

View file

@ -15,6 +15,7 @@ export const runTerminalCommandTool: Tool = {
"Run a terminal command in the current directory.\
The shell is not stateful and will not remember any previous commands.\
When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.\
When suggesting subsequent shell commands ALWAYS format them in shell command blocks.\
Do NOT perform actions requiring special/admin privileges.",
parameters: {
type: "object",

View file

@ -116,7 +116,7 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
{
name: "Terminal",
description: "Terminal command output",
content: terminalOutput + (code === 0
content: terminalOutput + (code === 0 || !code
? "\n[Background command completed]"
: `\n[Background command failed with exit code ${code}]`),
},