feat(sidechat): render local images and present deliveries
Cache markdown label objects by value so MarkdownText's memo survives parent re-renders; pass streaming for unsettled assistant rows. Rewrite local image destinations in Side Chat prose against the session cwd through the existing /sidebar/file media route. Map present tool calls and deliverables/presented events to a compact delivery card with thumbnails and the plugin's file-open path. Add the change spec, exploration notes, and regression tests.
This commit is contained in:
1 parent
f41830239f
commit
909f536eab
31 files changed
+1449
-61
No files matched your search
@@ -378,6 +378,92 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ── present deliverables card ────────────────────────────────────────
|
||||
* One card per `present` call (or per event-only delivery), one row per
|
||||
* delivered file: image thumbnail (through the media route) or type glyph,
|
||||
* basename, optional description, and a click that opens the file. The
|
||||
* quietest possible surface — a hairline box around ink-weight rows: the
|
||||
* main pane's delivery card at side-chat scale. */
|
||||
.sidechatDeliverables {
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
border: 1px solid var(--dsw-alias-hairline);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.sidechatDeliverablesHead {
|
||||
font: var(--dsw-font-xxs-12);
|
||||
color: var(--dsw-alias-label-tertiary);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.sidechatDeliverablesList {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sidechatDeliverableItem {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sidechatDeliverable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
padding: 3px 4px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
font: var(--dsw-font-xxs-12);
|
||||
color: var(--dsw-alias-label-secondary);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: background-color 100ms ease-out, color 100ms ease-out;
|
||||
}
|
||||
|
||||
.sidechatDeliverable:hover {
|
||||
background: var(--dsw-alias-interactive-bg-hover);
|
||||
color: var(--dsw-alias-label-primary);
|
||||
}
|
||||
|
||||
/* An image deliverable leads with its own pixels, so the reader recognizes
|
||||
* the artifact before reading the name. */
|
||||
.sidechatDeliverableThumb {
|
||||
flex: none;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
object-fit: cover;
|
||||
background: var(--dsw-alias-bg-base);
|
||||
}
|
||||
|
||||
.sidechatDeliverableName {
|
||||
flex: none;
|
||||
max-width: 55%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--dsw-alias-label-primary);
|
||||
}
|
||||
|
||||
.sidechatDeliverableDesc {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--dsw-alias-label-tertiary);
|
||||
}
|
||||
|
||||
/* Shimmer sweep text: generating (streaming row labels, creating hero). */
|
||||
.sidechatShimmerText {
|
||||
background-image: linear-gradient(
|
||||
|
||||
Reference in new issue
Block a user