mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
fix(cli): keep run_commands timeout out of session config
This commit is contained in:
@@ -26,7 +26,6 @@ import {
|
||||
type ClineCore,
|
||||
Llms,
|
||||
ProviderSettingsManager,
|
||||
readGlobalSettings,
|
||||
SessionSource,
|
||||
} from "@cline/core";
|
||||
import type { Message } from "@cline/shared";
|
||||
@@ -534,7 +533,6 @@ export class AcpAgent implements Agent {
|
||||
mode: session.currentMode,
|
||||
defaultToolAutoApprove: false,
|
||||
toolPolicies: { "*": { autoApprove: false } },
|
||||
runCommandsTimeoutMs: readGlobalSettings().runCommandsTimeoutMs ?? 30000,
|
||||
enableSpawnAgent: true,
|
||||
enableAgentTeams: false,
|
||||
enableTools: true,
|
||||
|
||||
@@ -118,7 +118,6 @@ export async function runCli(): Promise<void> {
|
||||
setClineDir(configDir);
|
||||
}
|
||||
setHomeDir(homedir());
|
||||
const { readGlobalSettings } = await import("@cline/core");
|
||||
|
||||
// Capture activation telemetry only after config/home directory selection
|
||||
// has been applied, so the telemetry singleton's persisted distinct-id
|
||||
@@ -864,7 +863,6 @@ export async function runCli(): Promise<void> {
|
||||
});
|
||||
|
||||
const config: Config = {
|
||||
runCommandsTimeoutMs: readGlobalSettings().runCommandsTimeoutMs,
|
||||
providerId: provider,
|
||||
modelId:
|
||||
args.model ??
|
||||
|
||||
@@ -583,7 +583,6 @@ export async function runInteractive(
|
||||
...readGlobalSettings(),
|
||||
runCommandsTimeoutMs: timeoutMs,
|
||||
});
|
||||
config.runCommandsTimeoutMs = timeoutMs;
|
||||
await sessionRuntime.ensureReady();
|
||||
await sessionRuntime.restartWithCurrentMessages();
|
||||
},
|
||||
|
||||
@@ -30,7 +30,6 @@ export interface Config extends Omit<CoreSessionConfig, "apiKey" | "mode"> {
|
||||
mode: CliAgentMode;
|
||||
defaultToolAutoApprove: boolean;
|
||||
toolPolicies: Record<string, ToolPolicy>;
|
||||
runCommandsTimeoutMs: number;
|
||||
}
|
||||
|
||||
export interface ActiveCliSession {
|
||||
|
||||
@@ -178,6 +178,8 @@ export function createBuiltinTools(
|
||||
|
||||
return createDefaultTools({
|
||||
...toolsConfig,
|
||||
bashTimeoutMs:
|
||||
toolsConfig.bashTimeoutMs ?? executorOptions.bash?.timeoutMs,
|
||||
executors,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -109,7 +109,6 @@ function createBuiltinToolsList(
|
||||
createBuiltinTools({
|
||||
cwd,
|
||||
...preset,
|
||||
bashTimeoutMs: runCommandsTimeoutMs,
|
||||
enableSkills: !!skillsExecutor,
|
||||
...toolRoutingConfig,
|
||||
executorOptions: {
|
||||
|
||||
Reference in New Issue
Block a user