summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/ui
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-10-24 18:34:12 +0900
committerAdam Malczewski <[email protected]>2026-10-24 18:34:12 +0900
commit48cdc3d19a319981a8a4128be98db3c283f81790 (patch)
tree0fa6531f3b05c81348f9d3427e9021dbb4832b5d /src/features/chat/ui
parentdaefad66bdf8dee132d701a3b43ce0d227dde241 (diff)
downloaddispatch-web-48cdc3d19a319981a8a4128be98db3c283f81790.tar.gz
dispatch-web-48cdc3d19a319981a8a4128be98db3c283f81790.zip
feat: render live text-file embeds in expandable Markdown blocks
Show rendered first/last six-line previews with expand, refresh and retry; bound and deduplicate context-guarded fetches. Verify 2586 tests twice with Node Web Storage compatibility flag, 2 live integration tests, typecheck, Biome and production build.
Diffstat (limited to 'src/features/chat/ui')
-rw-r--r--src/features/chat/ui/ChatView.svelte6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/features/chat/ui/ChatView.svelte b/src/features/chat/ui/ChatView.svelte
index c7f566a..84e66d8 100644
--- a/src/features/chat/ui/ChatView.svelte
+++ b/src/features/chat/ui/ChatView.svelte
@@ -11,7 +11,7 @@
viewTurnMetrics,
type TurnMetricsEntry,
} from "../../../core/metrics";
- import { Markdown } from "../../markdown";
+ import { Markdown, type TextFileClient } from "../../markdown";
import CacheTimerBadge from "./CacheTimerBadge.svelte";
import LazyCollapse from "./LazyCollapse.svelte";
import ToolCard from "./ToolCard.svelte";
@@ -32,6 +32,7 @@
providerRetry = null,
apiBaseUrl = "",
cwd = null,
+ textFiles = undefined,
cacheTimer = null,
}: {
chunks: readonly RenderedChunk[];
@@ -68,6 +69,8 @@
* and `file://` paths do not need it. Passed to `Markdown` with `apiBaseUrl`.
*/
cwd?: string | null;
+ /** Context-bound, injected live-file display port (never model history). */
+ textFiles?: TextFileClient | undefined;
/**
* The cache timer (gaps between model requests): a running step gap shows
* live at the bottom (under the executing tools), a running turn gap live
@@ -216,6 +219,7 @@
text={rendered.chunk.text}
streaming={rendered.streaming ?? false}
image={{ apiBase: apiBaseUrl, cwd }}
+ {textFiles}
/>
{:else if rendered.chunk.type === "error"}
<div class="text-error" role="alert">