Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

fix(local-system): restore loc param when calling readLocalFile IPC (#13748)

Octopus37bf1bd1914b
diff --git a/packages/builtin-tool-local-system/src/ExecutionRuntime/index.ts b/packages/builtin-tool-local-system/src/ExecutionRuntime/index.ts
index 589d987c63b..74c91a69950 100644
--- a/packages/builtin-tool-local-system/src/ExecutionRuntime/index.ts
+++ b/packages/builtin-tool-local-system/src/ExecutionRuntime/index.ts
@@ -120,6 +120,14 @@ export class LocalSystemExecutionRuntime extends ComputerRuntime {
return { shell_id: params.commandId };
}
+ case 'readLocalFile': {
+ const loc: [number, number] | undefined =
+ params.startLine !== undefined || params.endLine !== undefined
+ ? [params.startLine ?? 0, params.endLine ?? 200]
+ : undefined;
+ return { fullContent: params.fullContent, loc, path: params.path };
+ }
+
default: {
return params;
}