Compare commits

...
1 Commits
Author SHA1 Message Date
Simon Klee 99660c90eb test: stabilize prompt shell cwd test 2026-04-24 23:43:13 +02:00
+20 -18
View File
@@ -1055,26 +1055,28 @@ unix("shell captures stdout and stderr in completed tool output", () =>
) )
unix("shell completes a fast command on the preferred shell", () => unix("shell completes a fast command on the preferred shell", () =>
provideTmpdirInstance( withSh(() =>
(dir) => provideTmpdirInstance(
Effect.gen(function* () { (dir) =>
const { prompt, run, chat } = yield* boot() Effect.gen(function* () {
const result = yield* prompt.shell({ const { prompt, run, chat } = yield* boot()
sessionID: chat.id, const result = yield* prompt.shell({
agent: "build", sessionID: chat.id,
command: "pwd", agent: "build",
}) command: "pwd",
})
expect(result.info.role).toBe("assistant") expect(result.info.role).toBe("assistant")
const tool = completedTool(result.parts) const tool = completedTool(result.parts)
if (!tool) return if (!tool) return
expect(tool.state.input.command).toBe("pwd") expect(tool.state.input.command).toBe("pwd")
expect(tool.state.output).toContain(dir) expect(tool.state.output).toContain(dir)
expect(tool.state.metadata.output).toContain(dir) expect(tool.state.metadata.output).toContain(dir)
yield* run.assertNotBusy(chat.id) yield* run.assertNotBusy(chat.id)
}), }),
{ git: true, config: cfg }, { git: true, config: cfg },
),
), ),
) )