Apply PR #20039: feat: bash->shell tool + pwsh/powershell/cmd/bash specific tool definitions so agents work better

This commit is contained in:
opencode-agent[bot] 2026-04-27 19:47:33 +00:00
commit f89db03131
60 changed files with 876 additions and 346 deletions

View file

@ -242,7 +242,8 @@
align-items: flex-start;
gap: 0.375rem;
&[data-tool="bash"] {
&[data-tool="bash"],
&[data-tool="shell"] {
max-width: var(--sm-tool-width);
}

View file

@ -33,6 +33,7 @@ import type { Diagnostic } from "vscode-languageserver-types"
import styles from "./part.module.css"
const MIN_DURATION = 2000
const SHELL = new Set(["shell", "bash"])
export interface PartProps {
index: number
@ -90,7 +91,7 @@ export function Part(props: PartProps) {
<Match when={props.part.type === "tool" && props.part.tool === "todowrite"}>
<IconQueueList width={18} height={18} />
</Match>
<Match when={props.part.type === "tool" && props.part.tool === "bash"}>
<Match when={props.part.type === "tool" && SHELL.has(props.part.tool)}>
<IconCommandLine width={18} height={18} />
</Match>
<Match when={props.part.type === "tool" && props.part.tool === "edit"}>
@ -240,7 +241,7 @@ export function Part(props: PartProps) {
state={props.part.state}
/>
</Match>
<Match when={props.part.tool === "bash"}>
<Match when={SHELL.has(props.part.tool)}>
<BashTool
id={props.part.id}
tool={props.part.tool}