fix(client): distinguish grep/glob rows from the web search row
The grep, glob, and web_search tool rows all rendered as "Search" with the same magnifier icon, so a transcript full of local searches was indistinguishable from web searches. Grep and glob now carry their own command-named titles through TOOL_TITLES, and the web_search row wears a new globe glyph (IconGlobeOutline14) while keeping its "Search" title.
This commit is contained in:
@@ -23,8 +23,13 @@ import { CONVERSATION_NS as NS } from '../../locale.ts'
|
||||
/** Full row props: the toolview runtime share plus the standard locale seat. */
|
||||
type SearchRowProps = ToolCallViewProps & PropsLocale<'conversation'>
|
||||
|
||||
const SEARCH_TITLES: Record<string, string> = {
|
||||
grep: 'Grep',
|
||||
glob: 'Glob',
|
||||
}
|
||||
|
||||
/**
|
||||
* Search row: icon + Search · {summary} in the shared ToolRow chrome, with the
|
||||
* Search row: icon + Grep/Glob · {summary} in the shared ToolRow chrome, with the
|
||||
* completed search's card as the row's collapsed-by-default card body (a capped
|
||||
* search's recovery footer rides below it, inside ToolRow). Registered under
|
||||
* both `grep` and `glob`; the derived model's `kind` decides the card shape. A
|
||||
@@ -40,7 +45,7 @@ export function SearchRow({ toolName, block, inspect, t }: SearchRowProps) {
|
||||
variant={model.variant}
|
||||
toolName={toolName}
|
||||
icon={<IconSearchOutline16 size={14} />}
|
||||
title={model.title}
|
||||
title={SEARCH_TITLES[toolName] ?? model.title}
|
||||
// The result view's replacement title outranks the args-derived summary,
|
||||
// matching the terminal card's description precedence.
|
||||
summary={search?.title ?? model.summary}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// summary line alone.
|
||||
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import { IconBrowseOutline16, IconSearchOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import { IconBrowseOutline16, IconGlobeOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
|
||||
import type { ToolCallViewProps } from '../../contract/slots.ts'
|
||||
import { webCardModel } from '../models/web-card-model.ts'
|
||||
@@ -35,7 +35,8 @@ const WEB_TITLES: Record<string, string> = {
|
||||
export function WebRow({ toolName, block, inspect, t }: WebRowProps) {
|
||||
const model = toolRowModel(toolName, block)
|
||||
const web = webCardModel(block)
|
||||
const icon = toolName === 'web_fetch' ? <IconBrowseOutline16 size={14} /> : <IconSearchOutline16 size={14} />
|
||||
// Web search uses a globe; local grep/glob keep the magnifier family.
|
||||
const icon = toolName === 'web_fetch' ? <IconBrowseOutline16 size={14} /> : <IconGlobeOutline14 size={14} />
|
||||
return (
|
||||
<ToolRow
|
||||
t={t}
|
||||
|
||||
Reference in New Issue
Block a user