mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-14 21:32:40 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e529c3601f |
@@ -947,7 +947,7 @@ test("captures Claude stderr in the turn failure diagnostic when stderr arrives
|
||||
}
|
||||
});
|
||||
|
||||
test("preserves bypass capability across query restarts triggered by thinking changes", async () => {
|
||||
test("omits dangerous permission-skip allowance from default-mode launches", async () => {
|
||||
const capturedOptions: Array<{
|
||||
permissionMode?: string;
|
||||
allowDangerouslySkipPermissions?: boolean;
|
||||
@@ -964,11 +964,7 @@ test("preserves bypass capability across query restarts triggered by thinking ch
|
||||
effort?: string;
|
||||
};
|
||||
}) => {
|
||||
capturedOptions.push({
|
||||
permissionMode: options.permissionMode,
|
||||
allowDangerouslySkipPermissions: options.allowDangerouslySkipPermissions,
|
||||
effort: options.effort,
|
||||
});
|
||||
capturedOptions.push(options);
|
||||
|
||||
return createBaseQueryMock(vi.fn(async () => ({ done: true, value: undefined })));
|
||||
},
|
||||
@@ -977,21 +973,13 @@ test("preserves bypass capability across query restarts triggered by thinking ch
|
||||
const session = await createSession();
|
||||
|
||||
try {
|
||||
await session.setMode("bypassPermissions");
|
||||
await session.setMode("acceptEdits");
|
||||
await session.setThinkingOption("high");
|
||||
await session.setMode("bypassPermissions");
|
||||
await collectUntilTerminal(streamSession(session, "say exactly hello"));
|
||||
|
||||
expect(capturedOptions).toHaveLength(2);
|
||||
expect(capturedOptions).toHaveLength(1);
|
||||
expect(capturedOptions[0]).toMatchObject({
|
||||
permissionMode: "default",
|
||||
allowDangerouslySkipPermissions: true,
|
||||
});
|
||||
expect(capturedOptions[1]).toMatchObject({
|
||||
permissionMode: "acceptEdits",
|
||||
allowDangerouslySkipPermissions: true,
|
||||
effort: "high",
|
||||
});
|
||||
expect(capturedOptions[0]).not.toHaveProperty("allowDangerouslySkipPermissions");
|
||||
} finally {
|
||||
await session.close();
|
||||
}
|
||||
|
||||
@@ -2684,10 +2684,6 @@ class ClaudeAgentSession implements AgentSession {
|
||||
cwd: this.config.cwd,
|
||||
includePartialMessages: true,
|
||||
permissionMode: this.currentMode,
|
||||
// Dynamic mode switching can recreate the underlying Claude query. Keep the
|
||||
// bypass launch capability available so later setPermissionMode("bypassPermissions")
|
||||
// calls do not fail after a model/thinking/rewind-driven restart.
|
||||
allowDangerouslySkipPermissions: true,
|
||||
agents: this.defaults?.agents,
|
||||
canUseTool: this.handlePermissionRequest,
|
||||
pathToClaudeCodeExecutable: claudeBinary,
|
||||
|
||||
Reference in New Issue
Block a user