2026-02-06 15:28:35 -08:00
|
|
|
"use client";
|
|
|
|
|
|
2026-02-11 18:35:35 -08:00
|
|
|
import dynamic from "next/dynamic";
|
2026-02-06 15:28:35 -08:00
|
|
|
import type { UIMessage } from "ai";
|
2026-02-19 17:46:54 -08:00
|
|
|
import { memo, useMemo, useState } from "react";
|
2026-02-14 14:07:53 -08:00
|
|
|
import { motion, AnimatePresence } from "framer-motion";
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
import type { Components } from "react-markdown";
|
|
|
|
|
import ReactMarkdown from "react-markdown";
|
|
|
|
|
import remarkGfm from "remark-gfm";
|
2026-02-08 21:59:08 -08:00
|
|
|
import { ChainOfThought, type ChainPart } from "./chain-of-thought";
|
2026-02-11 18:35:35 -08:00
|
|
|
import { splitReportBlocks, hasReportBlocks } from "@/lib/report-blocks";
|
2026-02-13 18:06:59 -08:00
|
|
|
import { splitDiffBlocks, hasDiffBlocks } from "@/lib/diff-blocks";
|
2026-02-11 18:35:35 -08:00
|
|
|
import type { ReportConfig } from "./charts/types";
|
2026-02-13 18:06:59 -08:00
|
|
|
import { DiffCard } from "./diff-viewer";
|
|
|
|
|
import { SyntaxBlock } from "./syntax-block";
|
2026-02-11 18:35:35 -08:00
|
|
|
|
|
|
|
|
// Lazy-load ReportCard (uses Recharts which is heavy)
|
|
|
|
|
const ReportCard = dynamic(
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
() =>
|
|
|
|
|
import("./charts/report-card").then((m) => ({
|
|
|
|
|
default: m.ReportCard,
|
|
|
|
|
})),
|
|
|
|
|
{
|
|
|
|
|
ssr: false,
|
|
|
|
|
loading: () => (
|
|
|
|
|
<div
|
|
|
|
|
className="h-48 rounded-2xl animate-pulse"
|
|
|
|
|
style={{ background: "var(--color-surface-hover)" }}
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
2026-02-11 18:35:35 -08:00
|
|
|
);
|
2026-02-08 21:59:08 -08:00
|
|
|
|
2026-02-21 12:32:10 -08:00
|
|
|
/* ─── Silent-reply leak filter ─── */
|
|
|
|
|
|
|
|
|
|
const _SILENT_TOKEN = "NO_REPLY";
|
|
|
|
|
|
|
|
|
|
function isLeakedSilentToken(text: string): boolean {
|
|
|
|
|
const t = text.trim();
|
|
|
|
|
if (!t) {return false;}
|
|
|
|
|
if (new RegExp(`^${_SILENT_TOKEN}\\W*$`).test(t)) {return true;}
|
|
|
|
|
if (_SILENT_TOKEN.startsWith(t) && t.length >= 2 && t.length < _SILENT_TOKEN.length) {return true;}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-08 21:59:08 -08:00
|
|
|
/* ─── Part grouping ─── */
|
|
|
|
|
|
|
|
|
|
type MessageSegment =
|
|
|
|
|
| { type: "text"; text: string }
|
2026-02-11 18:35:35 -08:00
|
|
|
| { type: "chain"; parts: ChainPart[] }
|
2026-02-13 18:06:59 -08:00
|
|
|
| { type: "report-artifact"; config: ReportConfig }
|
2026-02-19 14:59:34 -08:00
|
|
|
| { type: "diff-artifact"; diff: string }
|
|
|
|
|
| { type: "subagent-card"; task: string; label?: string; status: "running" | "done" | "error" };
|
2026-02-08 21:59:08 -08:00
|
|
|
|
|
|
|
|
/** Map AI SDK tool state string to a simplified status */
|
|
|
|
|
function toolStatus(state: string): "running" | "done" | "error" {
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
if (state === "output-available") {
|
|
|
|
|
return "done";
|
|
|
|
|
}
|
|
|
|
|
if (state === "error") {
|
|
|
|
|
return "error";
|
|
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
return "running";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Group consecutive non-text parts (reasoning + tools) into chain-of-thought
|
|
|
|
|
* blocks, with text parts standing alone between them.
|
|
|
|
|
*/
|
|
|
|
|
function groupParts(parts: UIMessage["parts"]): MessageSegment[] {
|
|
|
|
|
const segments: MessageSegment[] = [];
|
|
|
|
|
let chain: ChainPart[] = [];
|
|
|
|
|
|
2026-02-13 18:40:46 -08:00
|
|
|
const flush = (textFollows?: boolean) => {
|
2026-02-08 21:59:08 -08:00
|
|
|
if (chain.length > 0) {
|
2026-02-13 18:40:46 -08:00
|
|
|
// If text content follows this chain, all tools must have
|
|
|
|
|
// completed — force any stuck "running" tools to "done".
|
|
|
|
|
if (textFollows) {
|
|
|
|
|
for (const cp of chain) {
|
|
|
|
|
if (cp.kind === "tool" && cp.status === "running") {
|
|
|
|
|
cp.status = "done";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
segments.push({ type: "chain", parts: [...chain] });
|
|
|
|
|
chain = [];
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for (const part of parts) {
|
|
|
|
|
if (part.type === "text") {
|
2026-02-11 18:35:35 -08:00
|
|
|
const text = (part as { type: "text"; text: string }).text;
|
2026-02-21 12:32:10 -08:00
|
|
|
if (isLeakedSilentToken(text)) { continue; }
|
|
|
|
|
flush(true);
|
2026-02-11 18:35:35 -08:00
|
|
|
if (hasReportBlocks(text)) {
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
segments.push(
|
|
|
|
|
...(splitReportBlocks(text) as MessageSegment[]),
|
|
|
|
|
);
|
2026-02-13 18:06:59 -08:00
|
|
|
} else if (hasDiffBlocks(text)) {
|
|
|
|
|
for (const seg of splitDiffBlocks(text)) {
|
|
|
|
|
if (seg.type === "diff-artifact") {
|
|
|
|
|
segments.push({ type: "diff-artifact", diff: seg.diff });
|
|
|
|
|
} else {
|
|
|
|
|
segments.push({ type: "text", text: seg.text });
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-11 18:35:35 -08:00
|
|
|
} else {
|
|
|
|
|
segments.push({ type: "text", text });
|
|
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
} else if (part.type === "reasoning") {
|
|
|
|
|
const rp = part as {
|
|
|
|
|
type: "reasoning";
|
|
|
|
|
text: string;
|
|
|
|
|
state?: string;
|
|
|
|
|
};
|
2026-02-14 14:07:53 -08:00
|
|
|
// Skip lifecycle/compaction status labels — they add noise
|
|
|
|
|
// (e.g. "Preparing response...", "Optimizing session context...")
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
const statusLabels = [
|
|
|
|
|
"Preparing response...",
|
|
|
|
|
"Optimizing session context...",
|
|
|
|
|
];
|
|
|
|
|
const isStatus = statusLabels.some((l) =>
|
|
|
|
|
rp.text.startsWith(l),
|
|
|
|
|
);
|
2026-02-14 14:07:53 -08:00
|
|
|
if (!isStatus) {
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
chain.push({
|
|
|
|
|
kind: "reasoning",
|
|
|
|
|
text: rp.text,
|
|
|
|
|
isStreaming: rp.state === "streaming",
|
|
|
|
|
});
|
|
|
|
|
}
|
2026-02-19 14:59:34 -08:00
|
|
|
} else if (part.type === "dynamic-tool") {
|
|
|
|
|
const tp = part as {
|
|
|
|
|
type: "dynamic-tool";
|
|
|
|
|
toolName: string;
|
|
|
|
|
toolCallId: string;
|
|
|
|
|
state: string;
|
|
|
|
|
input?: unknown;
|
|
|
|
|
output?: unknown;
|
|
|
|
|
};
|
|
|
|
|
if (tp.toolName === "sessions_spawn") {
|
|
|
|
|
flush(true);
|
|
|
|
|
const args = asRecord(tp.input);
|
|
|
|
|
const task = typeof args?.task === "string" ? args.task : "Subagent task";
|
|
|
|
|
const label = typeof args?.label === "string" ? args.label : undefined;
|
|
|
|
|
segments.push({ type: "subagent-card", task, label, status: toolStatus(tp.state) });
|
|
|
|
|
} else {
|
2026-02-08 21:59:08 -08:00
|
|
|
chain.push({
|
|
|
|
|
kind: "tool",
|
|
|
|
|
toolName: tp.toolName,
|
|
|
|
|
toolCallId: tp.toolCallId,
|
|
|
|
|
status: toolStatus(tp.state),
|
|
|
|
|
args: asRecord(tp.input),
|
|
|
|
|
output: asRecord(tp.output),
|
|
|
|
|
});
|
2026-02-19 14:59:34 -08:00
|
|
|
}
|
|
|
|
|
} else if (part.type.startsWith("tool-")) {
|
|
|
|
|
// Handles both live SSE parts (input/output fields) and
|
|
|
|
|
// persisted JSONL parts (args/result fields from tool-invocation)
|
|
|
|
|
const tp = part as {
|
|
|
|
|
type: string;
|
|
|
|
|
toolCallId: string;
|
|
|
|
|
toolName?: string;
|
|
|
|
|
state?: string;
|
|
|
|
|
title?: string;
|
|
|
|
|
input?: unknown;
|
|
|
|
|
output?: unknown;
|
|
|
|
|
// Persisted JSONL format uses args/result instead
|
|
|
|
|
args?: unknown;
|
|
|
|
|
result?: unknown;
|
|
|
|
|
errorText?: string;
|
|
|
|
|
};
|
|
|
|
|
const resolvedToolName = tp.title ?? tp.toolName ?? part.type.replace("tool-", "");
|
|
|
|
|
if (resolvedToolName === "sessions_spawn") {
|
|
|
|
|
flush(true);
|
|
|
|
|
const args = asRecord(tp.input) ?? asRecord(tp.args);
|
|
|
|
|
const task = typeof args?.task === "string" ? args.task : "Subagent task";
|
|
|
|
|
const label = typeof args?.label === "string" ? args.label : undefined;
|
|
|
|
|
const resolvedState =
|
|
|
|
|
tp.state ??
|
|
|
|
|
(tp.errorText ? "error" : ("result" in tp || "output" in tp) ? "output-available" : "input-available");
|
|
|
|
|
segments.push({ type: "subagent-card", task, label, status: toolStatus(resolvedState) });
|
|
|
|
|
} else {
|
2026-02-13 18:06:59 -08:00
|
|
|
// Persisted tool-invocation parts have no state field but
|
2026-02-13 23:55:20 -08:00
|
|
|
// include result/output/errorText to indicate completion.
|
2026-02-13 18:06:59 -08:00
|
|
|
const resolvedState =
|
|
|
|
|
tp.state ??
|
2026-02-13 23:55:20 -08:00
|
|
|
(tp.errorText ? "error" : ("result" in tp || "output" in tp) ? "output-available" : "input-available");
|
2026-02-08 21:59:08 -08:00
|
|
|
chain.push({
|
|
|
|
|
kind: "tool",
|
2026-02-19 14:59:34 -08:00
|
|
|
toolName: resolvedToolName,
|
2026-02-08 21:59:08 -08:00
|
|
|
toolCallId: tp.toolCallId,
|
2026-02-13 18:06:59 -08:00
|
|
|
status: toolStatus(resolvedState),
|
|
|
|
|
args: asRecord(tp.input) ?? asRecord(tp.args),
|
|
|
|
|
output: asRecord(tp.output) ?? asRecord(tp.result),
|
2026-02-08 21:59:08 -08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-19 14:59:34 -08:00
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
|
|
|
|
|
flush();
|
|
|
|
|
return segments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Safely cast unknown to Record if it's a non-null object */
|
|
|
|
|
function asRecord(
|
|
|
|
|
val: unknown,
|
|
|
|
|
): Record<string, unknown> | undefined {
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
if (val && typeof val === "object" && !Array.isArray(val)) {
|
|
|
|
|
return val as Record<string, unknown>;
|
|
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
return undefined;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-13 15:52:13 -08:00
|
|
|
/* ─── Attachment parsing for sent messages ─── */
|
|
|
|
|
|
|
|
|
|
function parseAttachments(
|
|
|
|
|
text: string,
|
|
|
|
|
): { paths: string[]; message: string } | null {
|
|
|
|
|
const match = text.match(/\[Attached files: (.+?)\]/);
|
|
|
|
|
if (!match) {return null;}
|
|
|
|
|
const afterIdx = (match.index ?? 0) + match[0].length;
|
|
|
|
|
const message = text.slice(afterIdx).trim();
|
|
|
|
|
const paths = match[1]
|
|
|
|
|
.split(", ")
|
|
|
|
|
.map((p) => p.trim())
|
|
|
|
|
.filter(Boolean);
|
|
|
|
|
return { paths, message };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getCategoryFromPath(
|
|
|
|
|
filePath: string,
|
|
|
|
|
): "image" | "video" | "audio" | "pdf" | "code" | "document" | "other" {
|
|
|
|
|
const ext = filePath.split(".").pop()?.toLowerCase() ?? "";
|
|
|
|
|
if (
|
|
|
|
|
[
|
|
|
|
|
"jpg", "jpeg", "png", "gif", "webp", "svg", "bmp",
|
|
|
|
|
"ico", "tiff", "heic",
|
|
|
|
|
].includes(ext)
|
|
|
|
|
)
|
|
|
|
|
{return "image";}
|
|
|
|
|
if (["mp4", "webm", "mov", "avi", "mkv", "flv"].includes(ext))
|
|
|
|
|
{return "video";}
|
|
|
|
|
if (["mp3", "wav", "ogg", "aac", "flac", "m4a"].includes(ext))
|
|
|
|
|
{return "audio";}
|
|
|
|
|
if (ext === "pdf") {return "pdf";}
|
|
|
|
|
if (
|
|
|
|
|
[
|
|
|
|
|
"js", "ts", "tsx", "jsx", "py", "rb", "go", "rs",
|
|
|
|
|
"java", "cpp", "c", "h", "css", "html", "json",
|
|
|
|
|
"yaml", "yml", "toml", "md", "sh", "bash", "sql",
|
|
|
|
|
"swift", "kt",
|
|
|
|
|
].includes(ext)
|
|
|
|
|
)
|
|
|
|
|
{return "code";}
|
|
|
|
|
if (
|
|
|
|
|
[
|
|
|
|
|
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt",
|
|
|
|
|
"rtf", "csv", "pages", "numbers", "key",
|
|
|
|
|
].includes(ext)
|
|
|
|
|
)
|
|
|
|
|
{return "document";}
|
|
|
|
|
return "other";
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-21 18:06:01 -08:00
|
|
|
function _shortenPath(path: string): string {
|
2026-02-13 15:52:13 -08:00
|
|
|
return path
|
|
|
|
|
.replace(/^\/Users\/[^/]+/, "~")
|
|
|
|
|
.replace(/^\/home\/[^/]+/, "~")
|
|
|
|
|
.replace(/^[A-Z]:\\Users\\[^\\]+/, "~");
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-21 18:06:01 -08:00
|
|
|
const _attachCategoryMeta: Record<string, { bg: string; fg: string }> = {
|
2026-02-13 15:52:13 -08:00
|
|
|
image: { bg: "rgba(16, 185, 129, 0.15)", fg: "#10b981" },
|
|
|
|
|
video: { bg: "rgba(139, 92, 246, 0.15)", fg: "#8b5cf6" },
|
|
|
|
|
audio: { bg: "rgba(245, 158, 11, 0.15)", fg: "#f59e0b" },
|
|
|
|
|
pdf: { bg: "rgba(239, 68, 68, 0.15)", fg: "#ef4444" },
|
|
|
|
|
code: { bg: "rgba(59, 130, 246, 0.15)", fg: "#3b82f6" },
|
|
|
|
|
document: { bg: "rgba(107, 114, 128, 0.15)", fg: "#6b7280" },
|
|
|
|
|
other: { bg: "rgba(107, 114, 128, 0.10)", fg: "#9ca3af" },
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-21 18:06:01 -08:00
|
|
|
function _AttachFileIcon({ category }: { category: string }) {
|
2026-02-13 15:52:13 -08:00
|
|
|
const props = {
|
|
|
|
|
width: 14,
|
|
|
|
|
height: 14,
|
|
|
|
|
viewBox: "0 0 24 24",
|
|
|
|
|
fill: "none",
|
|
|
|
|
stroke: "currentColor",
|
|
|
|
|
strokeWidth: 2,
|
|
|
|
|
strokeLinecap: "round" as const,
|
|
|
|
|
strokeLinejoin: "round" as const,
|
|
|
|
|
};
|
|
|
|
|
switch (category) {
|
|
|
|
|
case "image":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<rect
|
|
|
|
|
width="18"
|
|
|
|
|
height="18"
|
|
|
|
|
x="3"
|
|
|
|
|
y="3"
|
|
|
|
|
rx="2"
|
|
|
|
|
ry="2"
|
|
|
|
|
/>
|
|
|
|
|
<circle cx="9" cy="9" r="2" />
|
|
|
|
|
<path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
case "video":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" />
|
|
|
|
|
<rect x="2" y="6" width="14" height="12" rx="2" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
case "audio":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<path d="M9 18V5l12-2v13" />
|
|
|
|
|
<circle cx="6" cy="18" r="3" />
|
|
|
|
|
<circle cx="18" cy="16" r="3" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
case "pdf":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
|
|
|
<path d="M14 2v6h6" />
|
|
|
|
|
<path d="M10 13h4" />
|
|
|
|
|
<path d="M10 17h4" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
case "code":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<polyline points="16 18 22 12 16 6" />
|
|
|
|
|
<polyline points="8 6 2 12 8 18" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
case "document":
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
|
|
|
<path d="M14 2v6h6" />
|
|
|
|
|
<path d="M16 13H8" />
|
|
|
|
|
<path d="M16 17H8" />
|
|
|
|
|
<path d="M10 9H8" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
default:
|
|
|
|
|
return (
|
|
|
|
|
<svg {...props}>
|
|
|
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
|
|
|
<path d="M14 2v6h6" />
|
|
|
|
|
</svg>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AttachedFilesCard({ paths }: { paths: string[] }) {
|
|
|
|
|
return (
|
2026-02-20 00:02:18 -08:00
|
|
|
<div className="flex flex-wrap gap-1.5 mb-2 justify-end">
|
|
|
|
|
{paths.map((filePath, i) => {
|
|
|
|
|
const category = getCategoryFromPath(filePath);
|
|
|
|
|
const src = category === "image"
|
|
|
|
|
? `/api/workspace/raw-file?path=${encodeURIComponent(filePath)}`
|
|
|
|
|
: `/api/workspace/thumbnail?path=${encodeURIComponent(filePath)}&size=200`;
|
|
|
|
|
const ext = filePath.split(".").pop()?.toUpperCase() ?? "";
|
2026-02-13 15:52:13 -08:00
|
|
|
|
2026-02-20 00:02:18 -08:00
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
key={i}
|
|
|
|
|
className="relative rounded-xl overflow-hidden shrink-0"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
src={src}
|
|
|
|
|
alt={filePath.split("/").pop() ?? ""}
|
|
|
|
|
className="block rounded-xl object-cover"
|
|
|
|
|
style={{ maxHeight: 140, maxWidth: 160, background: "rgba(0,0,0,0.04)" }}
|
|
|
|
|
loading="lazy"
|
|
|
|
|
onError={(e) => { (e.currentTarget as HTMLImageElement).style.display = "none"; }}
|
|
|
|
|
/>
|
|
|
|
|
{category !== "image" && (
|
|
|
|
|
<span
|
|
|
|
|
className="absolute bottom-2 left-2 rounded-md px-1.5 py-0.5 text-[10px] font-bold uppercase"
|
|
|
|
|
style={{
|
|
|
|
|
background: "rgba(255,255,255,0.85)",
|
|
|
|
|
color: "rgba(0,0,0,0.5)",
|
|
|
|
|
backdropFilter: "blur(4px)",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{ext}
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2026-02-13 15:52:13 -08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-14 14:29:46 -08:00
|
|
|
/* ─── File path detection for clickable inline code ─── */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Detect whether an inline code string looks like a local file/directory path.
|
2026-02-14 14:39:07 -08:00
|
|
|
* Matches anything starting with:
|
|
|
|
|
* ~/ (home-relative)
|
|
|
|
|
* / (absolute)
|
|
|
|
|
* ./ (current-dir-relative)
|
|
|
|
|
* ../ (parent-dir-relative)
|
|
|
|
|
* Must contain at least one `/` separator to distinguish from plain commands.
|
2026-02-14 14:29:46 -08:00
|
|
|
*/
|
|
|
|
|
function looksLikeFilePath(text: string): boolean {
|
2026-02-14 14:39:07 -08:00
|
|
|
const t = text.trim();
|
|
|
|
|
if (!t || t.length < 3 || t.length > 500) {return false;}
|
2026-02-19 22:50:34 -08:00
|
|
|
// Full path prefix
|
|
|
|
|
if (t.startsWith("~/") || t.startsWith("/") || t.startsWith("./") || t.startsWith("../")) {
|
|
|
|
|
const afterPrefix = t.startsWith("~/") ? t.slice(2) :
|
|
|
|
|
t.startsWith("../") ? t.slice(3) :
|
|
|
|
|
t.startsWith("./") ? t.slice(2) :
|
|
|
|
|
t.slice(1);
|
|
|
|
|
return afterPrefix.includes("/") || afterPrefix.includes(".");
|
2026-02-14 14:39:07 -08:00
|
|
|
}
|
2026-02-19 22:50:34 -08:00
|
|
|
// Bare filename with a known extension (e.g. "Rachapoom-Passport.pdf")
|
|
|
|
|
const fileExtPattern = /\.(pdf|docx?|xlsx?|pptx?|csv|txt|rtf|pages|numbers|key|md|json|yaml|yml|toml|xml|html?|css|jsx?|tsx?|py|rb|go|rs|java|cpp|c|h|sh|sql|swift|kt|png|jpe?g|gif|webp|svg|bmp|ico|heic|tiff|mp[34]|webm|mov|avi|mkv|flv|wav|ogg|aac|flac|m4a|zip|tar|gz|dmg)$/i;
|
|
|
|
|
if (fileExtPattern.test(t) && !t.includes(" ")) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Check if text looks like a filename (allows spaces, used for bold text). */
|
|
|
|
|
function looksLikeFileName(text: string): boolean {
|
|
|
|
|
const t = text.trim();
|
|
|
|
|
if (!t || t.length < 3 || t.length > 300) {return false;}
|
|
|
|
|
const fileExtPattern = /\.(pdf|docx?|xlsx?|pptx?|csv|txt|rtf|pages|numbers|key|md|json|yaml|yml|toml|xml|html?|css|jsx?|tsx?|py|rb|go|rs|java|cpp|c|h|sh|sql|swift|kt|png|jpe?g|gif|webp|svg|bmp|ico|heic|tiff|mp[34]|webm|mov|avi|mkv|flv|wav|ogg|aac|flac|m4a|zip|tar|gz|dmg)$/i;
|
|
|
|
|
return fileExtPattern.test(t);
|
2026-02-14 14:29:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Open a file path using the system default application. */
|
|
|
|
|
async function openFilePath(path: string, reveal = false) {
|
|
|
|
|
try {
|
|
|
|
|
const res = await fetch("/api/workspace/open-file", {
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: { "Content-Type": "application/json" },
|
|
|
|
|
body: JSON.stringify({ path, reveal }),
|
|
|
|
|
});
|
|
|
|
|
if (!res.ok) {
|
|
|
|
|
const data = await res.json().catch(() => ({}));
|
|
|
|
|
console.error("Failed to open file:", data);
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.error("Failed to open file:", err);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
type FilePathClickHandler = (
|
|
|
|
|
path: string,
|
|
|
|
|
) => Promise<boolean | void> | boolean | void;
|
|
|
|
|
|
|
|
|
|
/** Convert file:// URLs to local paths for in-app preview routing. */
|
|
|
|
|
function normalizePathReference(value: string): string {
|
|
|
|
|
const trimmed = value.trim();
|
|
|
|
|
if (!trimmed.startsWith("file://")) {
|
|
|
|
|
return trimmed;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const url = new URL(trimmed);
|
|
|
|
|
if (url.protocol !== "file:") {
|
|
|
|
|
return trimmed;
|
|
|
|
|
}
|
|
|
|
|
const decoded = decodeURIComponent(url.pathname);
|
|
|
|
|
// Windows file URLs are /C:/... in URL form
|
|
|
|
|
if (/^\/[A-Za-z]:\//.test(decoded)) {
|
|
|
|
|
return decoded.slice(1);
|
|
|
|
|
}
|
|
|
|
|
return decoded;
|
|
|
|
|
} catch {
|
|
|
|
|
return trimmed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-14 14:29:46 -08:00
|
|
|
/** Clickable file path inline code element */
|
|
|
|
|
function FilePathCode({
|
|
|
|
|
path,
|
|
|
|
|
children,
|
2026-02-19 17:46:54 -08:00
|
|
|
onFilePathClick,
|
2026-02-14 14:29:46 -08:00
|
|
|
}: {
|
|
|
|
|
path: string;
|
|
|
|
|
children: React.ReactNode;
|
2026-02-19 17:46:54 -08:00
|
|
|
onFilePathClick?: FilePathClickHandler;
|
2026-02-14 14:29:46 -08:00
|
|
|
}) {
|
|
|
|
|
const [status, setStatus] = useState<"idle" | "opening" | "error">("idle");
|
|
|
|
|
|
|
|
|
|
const handleClick = async (e: React.MouseEvent) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
setStatus("opening");
|
|
|
|
|
try {
|
2026-02-19 17:46:54 -08:00
|
|
|
if (onFilePathClick) {
|
|
|
|
|
const handled = await onFilePathClick(path);
|
|
|
|
|
if (handled === false) {
|
|
|
|
|
setStatus("error");
|
|
|
|
|
setTimeout(() => setStatus("idle"), 2000);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2026-02-14 14:29:46 -08:00
|
|
|
setStatus("idle");
|
2026-02-19 17:46:54 -08:00
|
|
|
} else {
|
|
|
|
|
const res = await fetch("/api/workspace/open-file", {
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: { "Content-Type": "application/json" },
|
|
|
|
|
body: JSON.stringify({ path }),
|
|
|
|
|
});
|
|
|
|
|
if (!res.ok) {
|
|
|
|
|
setStatus("error");
|
|
|
|
|
setTimeout(() => setStatus("idle"), 2000);
|
|
|
|
|
} else {
|
|
|
|
|
setStatus("idle");
|
|
|
|
|
}
|
2026-02-14 14:29:46 -08:00
|
|
|
}
|
|
|
|
|
} catch {
|
|
|
|
|
setStatus("error");
|
|
|
|
|
setTimeout(() => setStatus("idle"), 2000);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleContextMenu = async (e: React.MouseEvent) => {
|
|
|
|
|
// Right-click reveals in Finder instead of opening
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
await openFilePath(path, true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<code
|
2026-02-19 22:50:34 -08:00
|
|
|
className={`px-[0.3em] no-underline transition-colors duration-150 rounded-[4px] border border-[color:var(--color-border)] bg-white/20 hover:bg-white/40 active:bg-white ${status === "opening" ? "cursor-wait opacity-70" : "cursor-pointer"}`}
|
|
|
|
|
style={{ color: "var(--color-accent)" }}
|
2026-02-14 14:29:46 -08:00
|
|
|
onClick={handleClick}
|
|
|
|
|
onContextMenu={handleContextMenu}
|
2026-02-19 17:46:54 -08:00
|
|
|
title={
|
|
|
|
|
status === "error"
|
|
|
|
|
? "File not found"
|
|
|
|
|
: onFilePathClick
|
|
|
|
|
? "Click to preview in workspace · Right-click to reveal in Finder"
|
|
|
|
|
: "Click to open · Right-click to reveal in Finder"
|
|
|
|
|
}
|
2026-02-14 14:29:46 -08:00
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</code>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
/* ─── Markdown component overrides for chat ─── */
|
2026-02-11 18:35:35 -08:00
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
function createMarkdownComponents(
|
|
|
|
|
onFilePathClick?: FilePathClickHandler,
|
|
|
|
|
): Components {
|
|
|
|
|
return {
|
2026-02-21 15:00:45 -08:00
|
|
|
// Open external links in new tab; intercept local file-path links
|
2026-02-19 17:46:54 -08:00
|
|
|
a: ({ href, children, ...props }) => {
|
|
|
|
|
const rawHref = typeof href === "string" ? href : "";
|
|
|
|
|
const normalizedHref = normalizePathReference(rawHref);
|
|
|
|
|
const isExternal =
|
|
|
|
|
rawHref && (rawHref.startsWith("http://") || rawHref.startsWith("https://") || rawHref.startsWith("//"));
|
|
|
|
|
const isWorkspaceAppLink = rawHref.startsWith("/workspace");
|
|
|
|
|
const isLocalPathLink =
|
|
|
|
|
!isWorkspaceAppLink &&
|
|
|
|
|
(Boolean(rawHref.startsWith("file://")) ||
|
|
|
|
|
looksLikeFilePath(normalizedHref));
|
|
|
|
|
return (
|
|
|
|
|
<a
|
|
|
|
|
href={href}
|
|
|
|
|
{...(isExternal
|
|
|
|
|
? { target: "_blank", rel: "noopener noreferrer" }
|
|
|
|
|
: {})}
|
|
|
|
|
{...props}
|
|
|
|
|
onClick={(e) => {
|
|
|
|
|
if (!isLocalPathLink || !onFilePathClick) {return;}
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
void onFilePathClick(normalizedHref);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</a>
|
|
|
|
|
);
|
|
|
|
|
},
|
2026-02-21 15:00:45 -08:00
|
|
|
// Route local image paths through raw-file API so workspace images render
|
|
|
|
|
img: ({ src, alt, ...props }) => {
|
|
|
|
|
const resolvedSrc = typeof src === "string" && !src.startsWith("http://") && !src.startsWith("https://") && !src.startsWith("data:")
|
|
|
|
|
? `/api/workspace/raw-file?path=${encodeURIComponent(src)}`
|
|
|
|
|
: src;
|
|
|
|
|
return (
|
|
|
|
|
// eslint-disable-next-line @next/next/no-img-element
|
|
|
|
|
<img src={resolvedSrc} alt={alt ?? ""} loading="lazy" {...props} />
|
|
|
|
|
);
|
|
|
|
|
},
|
2026-02-19 17:46:54 -08:00
|
|
|
// Syntax-highlighted fenced code blocks
|
|
|
|
|
pre: ({ children, ...props }) => {
|
|
|
|
|
const child = Array.isArray(children) ? children[0] : children;
|
|
|
|
|
if (
|
|
|
|
|
child &&
|
|
|
|
|
typeof child === "object" &&
|
|
|
|
|
"type" in child &&
|
|
|
|
|
(child as { type?: string }).type === "code"
|
|
|
|
|
) {
|
|
|
|
|
const codeEl = child as {
|
|
|
|
|
props?: {
|
|
|
|
|
className?: string;
|
|
|
|
|
children?: string;
|
|
|
|
|
};
|
2026-02-13 18:06:59 -08:00
|
|
|
};
|
2026-02-19 17:46:54 -08:00
|
|
|
const className = codeEl.props?.className ?? "";
|
|
|
|
|
const langMatch = className.match(/language-(\w+)/);
|
|
|
|
|
const lang = langMatch?.[1] ?? "";
|
|
|
|
|
const code =
|
|
|
|
|
typeof codeEl.props?.children === "string"
|
|
|
|
|
? codeEl.props.children.replace(/\n$/, "")
|
|
|
|
|
: "";
|
|
|
|
|
|
|
|
|
|
// Diff language: render as DiffCard
|
|
|
|
|
if (lang === "diff") {
|
|
|
|
|
return <DiffCard diff={code} />;
|
|
|
|
|
}
|
2026-02-13 18:06:59 -08:00
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
// Known language: syntax-highlight with shiki
|
|
|
|
|
if (lang) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="chat-code-block">
|
|
|
|
|
<div
|
|
|
|
|
className="chat-code-lang"
|
|
|
|
|
>
|
|
|
|
|
{lang}
|
|
|
|
|
</div>
|
|
|
|
|
<SyntaxBlock code={code} lang={lang} />
|
2026-02-13 18:06:59 -08:00
|
|
|
</div>
|
2026-02-19 17:46:54 -08:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Fallback: default pre rendering
|
|
|
|
|
return <pre {...props}>{children}</pre>;
|
|
|
|
|
},
|
|
|
|
|
// Inline code — detect file paths and make them clickable
|
|
|
|
|
code: ({ children, className, ...props }) => {
|
|
|
|
|
// If this code has a language class, it's inside a <pre> and
|
|
|
|
|
// will be handled by the pre override above. Just return raw.
|
|
|
|
|
if (className?.startsWith("language-")) {
|
|
|
|
|
return (
|
|
|
|
|
<code className={className} {...props}>
|
|
|
|
|
{children}
|
|
|
|
|
</code>
|
2026-02-13 18:06:59 -08:00
|
|
|
);
|
|
|
|
|
}
|
2026-02-14 14:29:46 -08:00
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
// Check if the inline code content looks like a file path
|
|
|
|
|
const text = typeof children === "string" ? children : "";
|
|
|
|
|
const normalizedText = normalizePathReference(text);
|
|
|
|
|
if (normalizedText && looksLikeFilePath(normalizedText)) {
|
|
|
|
|
return (
|
|
|
|
|
<FilePathCode path={normalizedText} onFilePathClick={onFilePathClick}>
|
|
|
|
|
{children}
|
|
|
|
|
</FilePathCode>
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-02-14 14:29:46 -08:00
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
// Regular inline code
|
|
|
|
|
return <code {...props}>{children}</code>;
|
|
|
|
|
},
|
2026-02-19 22:50:34 -08:00
|
|
|
// Bold text — detect filenames and make them clickable
|
|
|
|
|
strong: ({ children, ...props }) => {
|
|
|
|
|
const text = typeof children === "string" ? children
|
|
|
|
|
: Array.isArray(children) ? children.filter((c) => typeof c === "string").join("")
|
|
|
|
|
: "";
|
|
|
|
|
if (text && looksLikeFileName(text)) {
|
|
|
|
|
return (
|
|
|
|
|
<strong {...props}>
|
|
|
|
|
<FilePathCode path={text} onFilePathClick={onFilePathClick}>
|
|
|
|
|
{children}
|
|
|
|
|
</FilePathCode>
|
|
|
|
|
</strong>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return <strong {...props}>{children}</strong>;
|
|
|
|
|
},
|
2026-02-19 17:46:54 -08:00
|
|
|
};
|
|
|
|
|
}
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
|
2026-02-12 23:00:44 -08:00
|
|
|
/* ─── Chat message ─── */
|
2026-02-06 15:28:35 -08:00
|
|
|
|
2026-02-19 17:46:54 -08:00
|
|
|
export const ChatMessage = memo(function ChatMessage({ message, isStreaming, onSubagentClick, onFilePathClick }: { message: UIMessage; isStreaming?: boolean; onSubagentClick?: (task: string) => void; onFilePathClick?: FilePathClickHandler }) {
|
2026-02-08 21:59:08 -08:00
|
|
|
const isUser = message.role === "user";
|
|
|
|
|
const segments = groupParts(message.parts);
|
2026-02-19 17:46:54 -08:00
|
|
|
const markdownComponents = useMemo(
|
|
|
|
|
() => createMarkdownComponents(onFilePathClick),
|
|
|
|
|
[onFilePathClick],
|
|
|
|
|
);
|
2026-02-08 21:59:08 -08:00
|
|
|
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
if (isUser) {
|
2026-02-12 23:00:44 -08:00
|
|
|
// User: right-aligned subtle pill
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
const textContent = segments
|
|
|
|
|
.filter(
|
|
|
|
|
(s): s is { type: "text"; text: string } =>
|
|
|
|
|
s.type === "text",
|
|
|
|
|
)
|
|
|
|
|
.map((s) => s.text)
|
|
|
|
|
.join("\n");
|
|
|
|
|
|
2026-02-13 15:52:13 -08:00
|
|
|
// Parse attachment prefix from sent messages
|
|
|
|
|
const attachmentInfo = parseAttachments(textContent);
|
|
|
|
|
|
2026-02-20 00:02:18 -08:00
|
|
|
if (attachmentInfo) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col items-end gap-1.5 py-2">
|
|
|
|
|
{/* Attachment previews — standalone above the text bubble */}
|
|
|
|
|
<AttachedFilesCard paths={attachmentInfo.paths} />
|
|
|
|
|
{/* Text bubble */}
|
|
|
|
|
{attachmentInfo.message && (
|
|
|
|
|
<div
|
|
|
|
|
className="max-w-[80%] w-fit rounded-2xl rounded-br-sm px-3 py-2 text-sm leading-6 break-words chat-message-font"
|
|
|
|
|
style={{
|
|
|
|
|
background: "var(--color-user-bubble)",
|
|
|
|
|
color: "var(--color-user-bubble-text)",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<p className="whitespace-pre-wrap break-words">
|
|
|
|
|
{attachmentInfo.message}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
return (
|
|
|
|
|
<div className="flex justify-end py-2">
|
|
|
|
|
<div
|
2026-02-20 00:02:18 -08:00
|
|
|
className="max-w-[80%] min-w-0 rounded-2xl rounded-br-sm px-3 py-2 text-sm leading-6 overflow-hidden break-words chat-message-font"
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
style={{
|
|
|
|
|
background: "var(--color-user-bubble)",
|
|
|
|
|
color: "var(--color-user-bubble-text)",
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-02-20 00:02:18 -08:00
|
|
|
<p className="whitespace-pre-wrap break-words text-right">
|
|
|
|
|
{textContent}
|
|
|
|
|
</p>
|
2026-02-08 21:59:08 -08:00
|
|
|
</div>
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-02-08 21:59:08 -08:00
|
|
|
|
2026-02-14 14:07:53 -08:00
|
|
|
// Find the last text segment index for streaming optimization
|
|
|
|
|
const lastTextIdx = isStreaming
|
|
|
|
|
? segments.reduce((acc, s, i) => (s.type === "text" ? i : acc), -1)
|
|
|
|
|
: -1;
|
|
|
|
|
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
// Assistant: free-flowing text, left-aligned, NO bubble
|
|
|
|
|
return (
|
2026-02-16 00:45:28 -08:00
|
|
|
<div className="py-3 space-y-2 min-w-0 overflow-hidden">
|
2026-02-14 14:07:53 -08:00
|
|
|
<AnimatePresence initial={false}>
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
{segments.map((segment, index) => {
|
|
|
|
|
if (segment.type === "text") {
|
|
|
|
|
// Detect agent error messages
|
|
|
|
|
const errorMatch = segment.text.match(
|
|
|
|
|
/^\[error\]\s*([\s\S]*)$/,
|
|
|
|
|
);
|
|
|
|
|
if (errorMatch) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
key={index}
|
2026-02-19 16:50:52 -08:00
|
|
|
className="chat-message-font flex items-start gap-2 rounded-xl px-3 py-2 text-[13px] leading-relaxed overflow-hidden"
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
style={{
|
|
|
|
|
background: `color-mix(in srgb, var(--color-error) 6%, var(--color-surface))`,
|
|
|
|
|
color: "var(--color-error)",
|
|
|
|
|
border: `1px solid color-mix(in srgb, var(--color-error) 18%, transparent)`,
|
|
|
|
|
}}
|
Dench workspace: Tiptap markdown editor, subagent sessions, and error surfacing
── Tiptap Markdown Editor ──
- Add full Tiptap-based WYSIWYG markdown editor (markdown-editor.tsx, 709 LOC)
with bubble menu, auto-save (debounced), image drag-and-drop/paste upload,
table editing, task list checkboxes, and frontmatter preservation on save.
- Add slash command system (slash-command.tsx, 607 LOC) with "/" trigger for
block insertion (headings, lists, tables, code blocks, images, reports) and
"@" trigger for file/document mention with fuzzy search across the workspace
tree.
- Add ReportBlockNode (report-block-node.tsx) — custom Tiptap node that renders
embedded report-json blocks as interactive ReportCard widgets inline in the
editor, with expand/collapse and edit-JSON support.
- Add workspace asset serving API (api/workspace/assets/[...path]/route.ts) to
serve images from the workspace with proper MIME types.
- Add workspace file upload orkspace/upload/route.ts) for multipart
image uploads (10 MB limit, image types only), saving to assets/ directory.
- Add ~500 lines of Tiptap editor CSS to globals.css (editor layout, task lists,
images, tables, slash command dropdown, bubble menu toolbar, code blocks, etc.).
- Add 14 @tiptap/* dependencies to apps/web/package.json (react, starter-kit,
markdown, image, link, table, task-list, suggestion, placeholder, etc.).
── Document View: Edit/Read Mode Toggle ──
- document-view.tsx: Add edit/read mode toggle; defaults to edit mode when a
filePath is available. Lazy-loads MarkdownEditor to keep initial bundle light.
- workspace/page.tsx: Pass activePath, tree, onSave, onNavigate, and
onRefreshTree through to DocumentView for full editor integration with
workspace navigation and tree refresh after saves.
── Subagent Session Isolation ──
- agent-runner.ts: Add RunAgentOptions with optional sessionId; when set, spawns
the agent with --session-key agent:main:subagent:<id> ant so
file-scoped sidebar chats run in isolated sessions independent of the main
agent.
- route.ts (chat API): Accept sessionId from request body and forward it to
runAgent. Resolve workspace file path prefixes (resolveAgentWorkspacePrefix)
so tree-relative paths become agent-cwd-relative.
- chat-panel.tsx: Create per-instance DefaultChatTransport that injects sessionId
via body function and a ref (avoids stale closures). On file change, auto-load
the most recent session and its messages. Refresh session tab list after
streaming ends. Stop ongoing stream when switching sessions.
- register.agent.ts: Add --session-key <key> and --lane <lane> CLI flags.
- agent-via-gateway.ts: Wire sessionKey into session resolution and validation
for both interactive and --stream-json code paths.
- workspace.ts: Add resolveAgentWorkspacePrefix() to map workspace-root-relative
paths to repo-root-relative paths for the agent process.
── Error Surfacing ──
- agent-runner.ts: Add onAgentError callback extraction helpers
(parseAgentErrorMessage, parseErrorBody, parseErrorFromStderr) to surface
API-level errors (402 payment, rate limits, etc.) to the UI. Captures stderr
for fallback error detection on non-zero exit.
- route.ts: Wire onAgentError into the SSE stream as [error]-prefixed text
parts. Improve onError and onClose handlers with clearer error messages and
exit code reporting.
- chat-message.tsx: Detect [error]-prefixed text segments and render them as
styled error banners with alert icon instead of plain text.
- chat-panel.tsx: Restyle the transport-level error bar with themed colors and
an alert icon consistent with in-message error styling.
2026-02-11 20:54:30 -08:00
|
|
|
>
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
<span
|
|
|
|
|
className="flex-shrink-0 mt-0.5"
|
|
|
|
|
aria-hidden="true"
|
Dench workspace: Tiptap markdown editor, subagent sessions, and error surfacing
── Tiptap Markdown Editor ──
- Add full Tiptap-based WYSIWYG markdown editor (markdown-editor.tsx, 709 LOC)
with bubble menu, auto-save (debounced), image drag-and-drop/paste upload,
table editing, task list checkboxes, and frontmatter preservation on save.
- Add slash command system (slash-command.tsx, 607 LOC) with "/" trigger for
block insertion (headings, lists, tables, code blocks, images, reports) and
"@" trigger for file/document mention with fuzzy search across the workspace
tree.
- Add ReportBlockNode (report-block-node.tsx) — custom Tiptap node that renders
embedded report-json blocks as interactive ReportCard widgets inline in the
editor, with expand/collapse and edit-JSON support.
- Add workspace asset serving API (api/workspace/assets/[...path]/route.ts) to
serve images from the workspace with proper MIME types.
- Add workspace file upload orkspace/upload/route.ts) for multipart
image uploads (10 MB limit, image types only), saving to assets/ directory.
- Add ~500 lines of Tiptap editor CSS to globals.css (editor layout, task lists,
images, tables, slash command dropdown, bubble menu toolbar, code blocks, etc.).
- Add 14 @tiptap/* dependencies to apps/web/package.json (react, starter-kit,
markdown, image, link, table, task-list, suggestion, placeholder, etc.).
── Document View: Edit/Read Mode Toggle ──
- document-view.tsx: Add edit/read mode toggle; defaults to edit mode when a
filePath is available. Lazy-loads MarkdownEditor to keep initial bundle light.
- workspace/page.tsx: Pass activePath, tree, onSave, onNavigate, and
onRefreshTree through to DocumentView for full editor integration with
workspace navigation and tree refresh after saves.
── Subagent Session Isolation ──
- agent-runner.ts: Add RunAgentOptions with optional sessionId; when set, spawns
the agent with --session-key agent:main:subagent:<id> ant so
file-scoped sidebar chats run in isolated sessions independent of the main
agent.
- route.ts (chat API): Accept sessionId from request body and forward it to
runAgent. Resolve workspace file path prefixes (resolveAgentWorkspacePrefix)
so tree-relative paths become agent-cwd-relative.
- chat-panel.tsx: Create per-instance DefaultChatTransport that injects sessionId
via body function and a ref (avoids stale closures). On file change, auto-load
the most recent session and its messages. Refresh session tab list after
streaming ends. Stop ongoing stream when switching sessions.
- register.agent.ts: Add --session-key <key> and --lane <lane> CLI flags.
- agent-via-gateway.ts: Wire sessionKey into session resolution and validation
for both interactive and --stream-json code paths.
- workspace.ts: Add resolveAgentWorkspacePrefix() to map workspace-root-relative
paths to repo-root-relative paths for the agent process.
── Error Surfacing ──
- agent-runner.ts: Add onAgentError callback extraction helpers
(parseAgentErrorMessage, parseErrorBody, parseErrorFromStderr) to surface
API-level errors (402 payment, rate limits, etc.) to the UI. Captures stderr
for fallback error detection on non-zero exit.
- route.ts: Wire onAgentError into the SSE stream as [error]-prefixed text
parts. Improve onError and onClose handlers with clearer error messages and
exit code reporting.
- chat-message.tsx: Detect [error]-prefixed text segments and render them as
styled error banners with alert icon instead of plain text.
- chat-panel.tsx: Restyle the transport-level error bar with themed colors and
an alert icon consistent with in-message error styling.
2026-02-11 20:54:30 -08:00
|
|
|
>
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
<svg
|
|
|
|
|
width="16"
|
|
|
|
|
height="16"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
fill="none"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
strokeWidth="2"
|
|
|
|
|
strokeLinecap="round"
|
|
|
|
|
strokeLinejoin="round"
|
|
|
|
|
>
|
|
|
|
|
<circle
|
|
|
|
|
cx="12"
|
|
|
|
|
cy="12"
|
|
|
|
|
r="10"
|
|
|
|
|
/>
|
|
|
|
|
<line
|
|
|
|
|
x1="12"
|
|
|
|
|
y1="8"
|
|
|
|
|
x2="12"
|
|
|
|
|
y2="12"
|
|
|
|
|
/>
|
|
|
|
|
<line
|
|
|
|
|
x1="12"
|
|
|
|
|
y1="16"
|
|
|
|
|
x2="12.01"
|
|
|
|
|
y2="16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</span>
|
2026-02-16 00:45:28 -08:00
|
|
|
<span className="whitespace-pre-wrap break-all min-w-0">
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
{errorMatch[1].trim()}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-02-14 14:07:53 -08:00
|
|
|
|
|
|
|
|
// During streaming, render the active text as plain text
|
|
|
|
|
// to avoid expensive ReactMarkdown re-parses on every token.
|
|
|
|
|
// Switch to full markdown once streaming ends.
|
|
|
|
|
if (index === lastTextIdx) {
|
|
|
|
|
return (
|
|
|
|
|
<motion.div
|
|
|
|
|
key={`text-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
2026-02-19 16:50:52 -08:00
|
|
|
className="chat-prose chat-message-font text-sm whitespace-pre-wrap break-all"
|
2026-02-14 14:07:53 -08:00
|
|
|
style={{ color: "var(--color-text)" }}
|
|
|
|
|
>
|
|
|
|
|
{segment.text}
|
|
|
|
|
</motion.div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
Dench workspace: Tiptap markdown editor, subagent sessions, and error surfacing
── Tiptap Markdown Editor ──
- Add full Tiptap-based WYSIWYG markdown editor (markdown-editor.tsx, 709 LOC)
with bubble menu, auto-save (debounced), image drag-and-drop/paste upload,
table editing, task list checkboxes, and frontmatter preservation on save.
- Add slash command system (slash-command.tsx, 607 LOC) with "/" trigger for
block insertion (headings, lists, tables, code blocks, images, reports) and
"@" trigger for file/document mention with fuzzy search across the workspace
tree.
- Add ReportBlockNode (report-block-node.tsx) — custom Tiptap node that renders
embedded report-json blocks as interactive ReportCard widgets inline in the
editor, with expand/collapse and edit-JSON support.
- Add workspace asset serving API (api/workspace/assets/[...path]/route.ts) to
serve images from the workspace with proper MIME types.
- Add workspace file upload orkspace/upload/route.ts) for multipart
image uploads (10 MB limit, image types only), saving to assets/ directory.
- Add ~500 lines of Tiptap editor CSS to globals.css (editor layout, task lists,
images, tables, slash command dropdown, bubble menu toolbar, code blocks, etc.).
- Add 14 @tiptap/* dependencies to apps/web/package.json (react, starter-kit,
markdown, image, link, table, task-list, suggestion, placeholder, etc.).
── Document View: Edit/Read Mode Toggle ──
- document-view.tsx: Add edit/read mode toggle; defaults to edit mode when a
filePath is available. Lazy-loads MarkdownEditor to keep initial bundle light.
- workspace/page.tsx: Pass activePath, tree, onSave, onNavigate, and
onRefreshTree through to DocumentView for full editor integration with
workspace navigation and tree refresh after saves.
── Subagent Session Isolation ──
- agent-runner.ts: Add RunAgentOptions with optional sessionId; when set, spawns
the agent with --session-key agent:main:subagent:<id> ant so
file-scoped sidebar chats run in isolated sessions independent of the main
agent.
- route.ts (chat API): Accept sessionId from request body and forward it to
runAgent. Resolve workspace file path prefixes (resolveAgentWorkspacePrefix)
so tree-relative paths become agent-cwd-relative.
- chat-panel.tsx: Create per-instance DefaultChatTransport that injects sessionId
via body function and a ref (avoids stale closures). On file change, auto-load
the most recent session and its messages. Refresh session tab list after
streaming ends. Stop ongoing stream when switching sessions.
- register.agent.ts: Add --session-key <key> and --lane <lane> CLI flags.
- agent-via-gateway.ts: Wire sessionKey into session resolution and validation
for both interactive and --stream-json code paths.
- workspace.ts: Add resolveAgentWorkspacePrefix() to map workspace-root-relative
paths to repo-root-relative paths for the agent process.
── Error Surfacing ──
- agent-runner.ts: Add onAgentError callback extraction helpers
(parseAgentErrorMessage, parseErrorBody, parseErrorFromStderr) to surface
API-level errors (402 payment, rate limits, etc.) to the UI. Captures stderr
for fallback error detection on non-zero exit.
- route.ts: Wire onAgentError into the SSE stream as [error]-prefixed text
parts. Improve onError and onClose handlers with clearer error messages and
exit code reporting.
- chat-message.tsx: Detect [error]-prefixed text segments and render them as
styled error banners with alert icon instead of plain text.
- chat-panel.tsx: Restyle the transport-level error bar with themed colors and
an alert icon consistent with in-message error styling.
2026-02-11 20:54:30 -08:00
|
|
|
return (
|
2026-02-14 14:07:53 -08:00
|
|
|
<motion.div
|
|
|
|
|
key={`text-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
2026-02-19 16:50:52 -08:00
|
|
|
className="chat-prose chat-message-font text-sm"
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
style={{ color: "var(--color-text)" }}
|
|
|
|
|
>
|
|
|
|
|
<ReactMarkdown
|
|
|
|
|
remarkPlugins={[remarkGfm]}
|
2026-02-19 17:46:54 -08:00
|
|
|
components={markdownComponents}
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
>
|
|
|
|
|
{segment.text}
|
|
|
|
|
</ReactMarkdown>
|
2026-02-14 14:07:53 -08:00
|
|
|
</motion.div>
|
Dench workspace: Tiptap markdown editor, subagent sessions, and error surfacing
── Tiptap Markdown Editor ──
- Add full Tiptap-based WYSIWYG markdown editor (markdown-editor.tsx, 709 LOC)
with bubble menu, auto-save (debounced), image drag-and-drop/paste upload,
table editing, task list checkboxes, and frontmatter preservation on save.
- Add slash command system (slash-command.tsx, 607 LOC) with "/" trigger for
block insertion (headings, lists, tables, code blocks, images, reports) and
"@" trigger for file/document mention with fuzzy search across the workspace
tree.
- Add ReportBlockNode (report-block-node.tsx) — custom Tiptap node that renders
embedded report-json blocks as interactive ReportCard widgets inline in the
editor, with expand/collapse and edit-JSON support.
- Add workspace asset serving API (api/workspace/assets/[...path]/route.ts) to
serve images from the workspace with proper MIME types.
- Add workspace file upload orkspace/upload/route.ts) for multipart
image uploads (10 MB limit, image types only), saving to assets/ directory.
- Add ~500 lines of Tiptap editor CSS to globals.css (editor layout, task lists,
images, tables, slash command dropdown, bubble menu toolbar, code blocks, etc.).
- Add 14 @tiptap/* dependencies to apps/web/package.json (react, starter-kit,
markdown, image, link, table, task-list, suggestion, placeholder, etc.).
── Document View: Edit/Read Mode Toggle ──
- document-view.tsx: Add edit/read mode toggle; defaults to edit mode when a
filePath is available. Lazy-loads MarkdownEditor to keep initial bundle light.
- workspace/page.tsx: Pass activePath, tree, onSave, onNavigate, and
onRefreshTree through to DocumentView for full editor integration with
workspace navigation and tree refresh after saves.
── Subagent Session Isolation ──
- agent-runner.ts: Add RunAgentOptions with optional sessionId; when set, spawns
the agent with --session-key agent:main:subagent:<id> ant so
file-scoped sidebar chats run in isolated sessions independent of the main
agent.
- route.ts (chat API): Accept sessionId from request body and forward it to
runAgent. Resolve workspace file path prefixes (resolveAgentWorkspacePrefix)
so tree-relative paths become agent-cwd-relative.
- chat-panel.tsx: Create per-instance DefaultChatTransport that injects sessionId
via body function and a ref (avoids stale closures). On file change, auto-load
the most recent session and its messages. Refresh session tab list after
streaming ends. Stop ongoing stream when switching sessions.
- register.agent.ts: Add --session-key <key> and --lane <lane> CLI flags.
- agent-via-gateway.ts: Wire sessionKey into session resolution and validation
for both interactive and --stream-json code paths.
- workspace.ts: Add resolveAgentWorkspacePrefix() to map workspace-root-relative
paths to repo-root-relative paths for the agent process.
── Error Surfacing ──
- agent-runner.ts: Add onAgentError callback extraction helpers
(parseAgentErrorMessage, parseErrorBody, parseErrorFromStderr) to surface
API-level errors (402 payment, rate limits, etc.) to the UI. Captures stderr
for fallback error detection on non-zero exit.
- route.ts: Wire onAgentError into the SSE stream as [error]-prefixed text
parts. Improve onError and onClose handlers with clearer error messages and
exit code reporting.
- chat-message.tsx: Detect [error]-prefixed text segments and render them as
styled error banners with alert icon instead of plain text.
- chat-panel.tsx: Restyle the transport-level error bar with themed colors and
an alert icon consistent with in-message error styling.
2026-02-11 20:54:30 -08:00
|
|
|
);
|
feat(web): full UI redesign with light/dark theme, TanStack data tables, media rendering, and gateway-routed agent execution
Overhaul the Dench web app with a comprehensive visual redesign and several
major feature additions across the chat interface, workspace, and agent
runtime layer.
Theme & Design System
- Replace the dark-only palette with a full light/dark theme system that
respects system preference via localStorage + inline script (no FOUC).
- Introduce new design tokens: glassmorphism surfaces, semantic colors
(success/warning/error/info), object-type chip palettes, and a tiered
shadow scale (sm/md/lg/xl).
- Add Instrument Serif + Inter via Google Fonts for a refined typographic
hierarchy; headings use the serif face, body uses Inter.
- Rebrand UI from "Ironclaw" to "Dench" across the landing page and
metadata.
Chat & Chain-of-Thought
- Rewrite the chain-of-thought component with inline media detection and
rendering — images, video, audio, and PDFs referenced in agent output
are now displayed directly in the conversation thread.
- Add status indicator parts (e.g. "Preparing response...",
"Optimizing session context...") that render as subtle activity badges
instead of verbose reasoning blocks.
- Integrate react-markdown with remark-gfm for proper markdown rendering
in assistant messages (tables, strikethrough, autolinks, etc.).
- Improve report-block splitting and lazy-loaded ReportCard rendering.
Workspace
- Introduce @tanstack/react-table for the object table, replacing the
hand-rolled table with full column sorting, fuzzy filtering via
match-sorter-utils, row selection, and bulk actions.
- Add a new media viewer component for in-workspace image/video/PDF
preview.
- New API routes: bulk-delete entries, field management (CRUD + reorder),
raw-file serving endpoint for media assets.
- Redesign workspace sidebar, empty state, and entry detail modal with
the new theme tokens and improved layout.
Agent Runtime
- Switch web agent execution from --local to gateway-routed mode so
concurrent chat threads share the gateway's lane-based concurrency
system, eliminating cross-process file-lock contention.
- Advertise "tool-events" capability during WebSocket handshake so the
gateway streams tool start/update/result events to the UI.
- Add new agent callback hooks: onLifecycleStart, onCompactionStart/End,
and onToolUpdate for richer real-time feedback.
- Forward media URLs emitted by agent events into the chat stream.
Dependencies
- Add @tanstack/match-sorter-utils and @tanstack/react-table to the web
app.
Published as ironclaw@2026.2.10-1.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:17:23 -08:00
|
|
|
}
|
2026-02-13 18:06:59 -08:00
|
|
|
if (segment.type === "report-artifact") {
|
|
|
|
|
return (
|
2026-02-14 14:07:53 -08:00
|
|
|
<motion.div
|
|
|
|
|
key={`report-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
|
|
|
|
>
|
|
|
|
|
<ReportCard config={segment.config} />
|
|
|
|
|
</motion.div>
|
2026-02-13 18:06:59 -08:00
|
|
|
);
|
|
|
|
|
}
|
2026-02-19 14:59:34 -08:00
|
|
|
if (segment.type === "diff-artifact") {
|
|
|
|
|
return (
|
|
|
|
|
<motion.div
|
|
|
|
|
key={`diff-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
|
|
|
|
>
|
|
|
|
|
<DiffCard diff={segment.diff} />
|
|
|
|
|
</motion.div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
if (segment.type === "subagent-card") {
|
|
|
|
|
const truncatedTask = segment.task.length > 80 ? segment.task.slice(0, 80) + "..." : segment.task;
|
|
|
|
|
const isRunning = segment.status === "running";
|
|
|
|
|
return (
|
|
|
|
|
<motion.div
|
|
|
|
|
key={`subagent-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
|
|
|
|
>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
onClick={() => onSubagentClick?.(segment.task)}
|
|
|
|
|
className="w-full text-left rounded-xl px-3.5 py-2.5 transition-colors cursor-pointer"
|
|
|
|
|
style={{
|
|
|
|
|
background: "var(--color-accent-light)",
|
|
|
|
|
border: "1px solid color-mix(in srgb, var(--color-accent) 20%, transparent)",
|
|
|
|
|
}}
|
2026-02-14 14:07:53 -08:00
|
|
|
>
|
2026-02-19 14:59:34 -08:00
|
|
|
<div className="flex items-center gap-2.5">
|
|
|
|
|
{isRunning ? (
|
|
|
|
|
<span
|
|
|
|
|
className="inline-block w-2 h-2 rounded-full animate-pulse flex-shrink-0"
|
|
|
|
|
style={{ background: "var(--color-accent)" }}
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="flex-shrink-0" style={{ color: "var(--color-accent)" }}>
|
|
|
|
|
<path d="M16 3h5v5" /><path d="m21 3-7 7" /><path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" />
|
|
|
|
|
</svg>
|
|
|
|
|
)}
|
|
|
|
|
<div className="min-w-0 flex-1">
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="text-[10px] font-semibold uppercase tracking-wider" style={{ color: "var(--color-accent)" }}>
|
|
|
|
|
{isRunning ? "Running Subagent" : "Subagent"}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-xs mt-0.5 leading-relaxed" style={{ color: "var(--color-text)" }}>
|
|
|
|
|
{segment.label || truncatedTask}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="flex-shrink-0 opacity-40" style={{ color: "var(--color-text)" }}>
|
|
|
|
|
<path d="m9 18 6-6-6-6" />
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
|
|
|
|
</motion.div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<motion.div
|
|
|
|
|
key={`chain-${index}`}
|
|
|
|
|
initial={{ opacity: 0, y: 4 }}
|
|
|
|
|
animate={{ opacity: 1, y: 0 }}
|
|
|
|
|
transition={{ duration: 0.2, ease: "easeOut" }}
|
|
|
|
|
>
|
|
|
|
|
<ChainOfThought
|
|
|
|
|
parts={segment.parts}
|
|
|
|
|
isStreaming={isStreaming}
|
|
|
|
|
/>
|
|
|
|
|
</motion.div>
|
|
|
|
|
);
|
2026-02-11 18:35:35 -08:00
|
|
|
})}
|
2026-02-14 14:07:53 -08:00
|
|
|
</AnimatePresence>
|
2026-02-08 21:59:08 -08:00
|
|
|
</div>
|
|
|
|
|
);
|
2026-02-14 14:07:53 -08:00
|
|
|
});
|