From 07d84fe008905e17894a053e4cb80fce3ae28a99 Mon Sep 17 00:00:00 2001 From: adamelmore <2363879+adamdottv@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:18:07 -0600 Subject: feat(app): show loaded agents.md files --- packages/ui/src/components/message-part.css | 17 +++++++++++++ packages/ui/src/components/message-part.tsx | 37 ++++++++++++++++++++++------- 2 files changed, 45 insertions(+), 9 deletions(-) (limited to 'packages/ui/src/components') diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css index 56fe9cf41..2bef792a2 100644 --- a/packages/ui/src/components/message-part.css +++ b/packages/ui/src/components/message-part.css @@ -809,3 +809,20 @@ display: none; } } + +[data-component="tool-loaded-file"] { + display: flex; + align-items: center; + gap: 8px; + padding: 4px 0 4px 28px; + font-family: var(--font-family-sans); + font-size: var(--font-size-small); + font-weight: var(--font-weight-regular); + line-height: var(--line-height-large); + color: var(--text-weak); + + [data-component="icon"] { + flex-shrink: 0; + color: var(--icon-weak); + } +} diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx index 3fde255c8..7aad01ace 100644 --- a/packages/ui/src/components/message-part.tsx +++ b/packages/ui/src/components/message-part.tsx @@ -724,20 +724,39 @@ PART_MAPPING["reasoning"] = function ReasoningPartDisplay(props) { ToolRegistry.register({ name: "read", render(props) { + const data = useData() const i18n = useI18n() const args: string[] = [] if (props.input.offset) args.push("offset=" + props.input.offset) if (props.input.limit) args.push("limit=" + props.input.limit) + const loaded = createMemo(() => { + if (props.status !== "completed") return [] + const value = props.metadata.loaded + if (!value || !Array.isArray(value)) return [] + return value.filter((p): p is string => typeof p === "string") + }) return ( - + <> + + + {(filepath) => ( + + + + {i18n.t("ui.tool.loaded")} {relativizeProjectPaths(filepath, data.directory)} + + + )} + + > ) }, }) -- cgit v1.2.3