feat: support clarification tool

This commit is contained in:
Henry Li
2026-01-18 20:17:32 +08:00
parent 69b225082b
commit dc04042b53

View File

@@ -6,6 +6,7 @@ import {
FolderOpenIcon, FolderOpenIcon,
GlobeIcon, GlobeIcon,
LightbulbIcon, LightbulbIcon,
MessageCircleQuestionMarkIcon,
NotebookPenIcon, NotebookPenIcon,
SearchIcon, SearchIcon,
SquareTerminalIcon, SquareTerminalIcon,
@@ -83,7 +84,7 @@ export function MessageGroup({
<span className="opacity-60"> <span className="opacity-60">
{showAbove {showAbove
? "Less steps" ? "Less steps"
: `${aboveLastToolCallSteps.length} more steps`} : `${aboveLastToolCallSteps.length} more step${aboveLastToolCallSteps.length === 1 ? "" : "s"}`}
</span> </span>
} }
icon={ icon={
@@ -318,6 +319,15 @@ function ToolCall({
</ChainOfThoughtSearchResult> </ChainOfThoughtSearchResult>
</ChainOfThoughtStep> </ChainOfThoughtStep>
); );
}
if (name === "ask_clarification") {
return (
<ChainOfThoughtStep
key={id}
label="Need your help"
icon={MessageCircleQuestionMarkIcon}
></ChainOfThoughtStep>
);
} else { } else {
const description: string | undefined = (args as { description: string }) const description: string | undefined = (args as { description: string })
?.description; ?.description;