mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-06 06:41:56 +00:00
fix(web): label terminal cards with concise command names (#1201)
* fix(web): label terminal cards with command names * fix(web): honor concise titles across shell cards
This commit is contained in:
@@ -48,6 +48,7 @@ describe('getToolGroupActionKind', () => {
|
||||
expect(getToolGroupActionKind(makeToolBlock('read-1', 'Read'))).toBe('read')
|
||||
expect(getToolGroupActionKind(makeToolBlock('grep-1', 'Grep'))).toBe('search')
|
||||
expect(getToolGroupActionKind(makeToolBlock('bash-1', 'Bash'))).toBe('command')
|
||||
expect(getToolGroupActionKind(makeToolBlock('shell-1', 'run_shell_command'))).toBe('command')
|
||||
expect(getToolGroupActionKind(makeToolBlock('edit-1', 'Edit'))).toBe('mutation')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -97,7 +97,7 @@ export function getToolGroupActionKind(block: ToolCallBlock): ToolGroupActionKin
|
||||
|
||||
if (name === 'Read' || name === 'NotebookRead') return 'read'
|
||||
if (name === 'Grep' || name === 'Glob' || name === 'LS') return 'search'
|
||||
if (name === 'Bash' || name === 'CodexBash' || name === 'shell_command') return 'command'
|
||||
if (name === 'Bash' || name === 'CodexBash' || name === 'shell_command' || name === 'run_shell_command') return 'command'
|
||||
if (name === 'Edit' || name === 'MultiEdit' || name === 'Write' || name === 'NotebookEdit' || name === 'CodexPatch' || name === 'CodexDiff') {
|
||||
return 'mutation'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user