mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-16 20:01:59 +00:00
Apply PR #20039: feat: bash->shell tool + pwsh/powershell/cmd/bash specific tool definitions so agents work better
This commit is contained in:
commit
f89db03131
60 changed files with 876 additions and 346 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue