feat(webui): unify icons and refine interaction feedback (#6074)
* feat(webui): unify product icons and refine interaction feedback * test(webui): align layout and tooltip expectations with icon refresh * test(webui): verify temporary chat uses shared icon controls * fix(webui): toggle workspace access directly and restore send arrow * fix(webui): keep the send control circular * fix(webui): clear workspace toggle background on pointer leave * test(webui): isolate GitHub navigation in star prompt tests * test(webui): prevent external default navigation during star link clicks
This commit is contained in:
1 parent
9dc0abae4f
commit
63bdd40280
59 files changed
+615
-505
No files matched your search
@@ -1,12 +1,18 @@
|
||||
import {
|
||||
AlertCircle,
|
||||
FileSearch,
|
||||
FolderOpen,
|
||||
ListTree,
|
||||
MemoryStick,
|
||||
Play,
|
||||
type LucideIcon,
|
||||
} from "lucide-react";
|
||||
DelegationIcon,
|
||||
TaskInspectIcon,
|
||||
TaskMessageIcon,
|
||||
StopIcon,
|
||||
ImageGenerationIcon,
|
||||
ConversationIcon,
|
||||
AutomationsIcon,
|
||||
GoalIcon,
|
||||
FileReadIcon,
|
||||
FileListIcon,
|
||||
MemoryIcon,
|
||||
ToolRunIcon,
|
||||
} from "@/components/icons/product-icons";
|
||||
import { AlertCircle, FileSearch, type LucideIcon } from "lucide-react";
|
||||
import { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
@@ -48,14 +54,27 @@ function buildModel(items: GenericToolRunItem[], t: ReturnType<typeof useTransla
|
||||
const presentation = describeGenericToolRun(items, t);
|
||||
return {
|
||||
...presentation,
|
||||
icon: activityIcon(family),
|
||||
icon: activityIcon(family, items[0]),
|
||||
};
|
||||
}
|
||||
|
||||
function activityIcon(family: ToolFamily): LucideIcon {
|
||||
function activityIcon(family: ToolFamily, item: GenericToolRunItem | undefined): LucideIcon {
|
||||
const name = item?.trace.name;
|
||||
const action = item?.trace.fields.find((field) => field.key === "action")?.value.toLowerCase();
|
||||
if (name === "spawn") return DelegationIcon;
|
||||
if (name === "subagent") {
|
||||
if (action === "check") return TaskInspectIcon;
|
||||
if (action === "send") return TaskMessageIcon;
|
||||
if (action === "cancel") return StopIcon;
|
||||
return DelegationIcon;
|
||||
}
|
||||
if (name === "generate_image") return ImageGenerationIcon;
|
||||
if (name === "message") return ConversationIcon;
|
||||
if (name === "cron") return AutomationsIcon;
|
||||
if (name === "create_goal") return GoalIcon;
|
||||
if (family === "content-search" || family === "file-search") return FileSearch;
|
||||
if (family === "list") return ListTree;
|
||||
if (family === "read") return FolderOpen;
|
||||
if (family === "memory") return MemoryStick;
|
||||
return Play;
|
||||
if (family === "list") return FileListIcon;
|
||||
if (family === "read") return FileReadIcon;
|
||||
if (family === "memory") return MemoryIcon;
|
||||
return ToolRunIcon;
|
||||
}
|
||||
Reference in new issue
Block a user