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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user