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(github): render runCommand tool result card (#15441)

Arvin Xu643ad16a5dcd
diff --git a/packages/builtin-tools/src/github/index.ts b/packages/builtin-tools/src/github/index.ts
index 30c2d9bb145..67b9b8f0c4e 100644
--- a/packages/builtin-tools/src/github/index.ts
+++ b/packages/builtin-tools/src/github/index.ts
@@ -6,13 +6,18 @@ import GithubRunCommandRender from './RunCommandRender';
export const GithubIdentifier = 'github';
export const GithubApiName = {
- runCommand: 'run_command',
+ runCommand: 'runCommand',
} as const;
+// The tool call emits the camelCase `runCommand` apiName, while older payloads
+// used the snake_case `run_command`. Register both so the render/inspector match
+// regardless of the casing.
export const GithubInspectors: Record<string, BuiltinInspector> = {
- [GithubApiName.runCommand]: GithubRunCommandInspector as BuiltinInspector,
+ runCommand: GithubRunCommandInspector as BuiltinInspector,
+ run_command: GithubRunCommandInspector as BuiltinInspector,
};
export const GithubRenders: Record<string, BuiltinRender> = {
- [GithubApiName.runCommand]: GithubRunCommandRender as BuiltinRender,
+ runCommand: GithubRunCommandRender as BuiltinRender,
+ run_command: GithubRunCommandRender as BuiltinRender,
};