fix(coding-agent): fixed tool output bugs and documented patterns

- Fixed file descriptor leak in OutputSink when write fails
- Fixed isError flag not propagating to UI for grouped tool calls
- Fixed Python streaming updates during cell execution (missing onChunk)
- Fixed ls icon detection broken by age suffix in entry names
- Added Tool Output Infrastructure section to DEVELOPMENT.md
This commit is contained in:
can1357
2026-01-23 12:31:40 +01:00
parent cb5bbbf382
commit bb59279705
6 changed files with 122 additions and 105 deletions
+8 -1
View File
@@ -254,7 +254,14 @@ export class PythonTool implements AgentTool<typeof pythonSchema> {
const sessionFile = this.session.getSessionFile?.() ?? undefined;
const artifactsDir = this.session.getArtifactsDir?.() ?? undefined;
const { artifactPath, artifactId } = await allocateOutputArtifact(this.session, "python");
outputSink = new OutputSink({ artifactPath, artifactId });
outputSink = new OutputSink({
artifactPath,
artifactId,
onChunk: (chunk) => {
appendTail(chunk);
pushUpdate();
},
});
const sessionId = sessionFile ? `session:${sessionFile}:cwd:${commandCwd}` : `cwd:${commandCwd}`;
const baseExecutorOptions: Omit<PythonExecutorOptions, "reset"> = {
cwd: commandCwd,