Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/tui/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ export const dict = {
"session.thought": "Thought",
"session.thought.detail": "Thought: {{detail}}",
"session.compaction": " Compaction ",
"session.compaction.summary": "Conversation summary (click to show)",
"session.todos": "# Todos",
"session.questions": "# Questions",
"session.click_to_expand": "Click to expand",
Expand Down
1 change: 1 addition & 0 deletions packages/tui/src/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export const dict: Record<TuiI18nKey, string> = {
"session.thought": "생각 끝",
"session.thought.detail": "생각 끝: {{detail}}",
"session.compaction": " 요약 ",
"session.compaction.summary": "대화 요약 (눌러서 보기)",
"session.todos": "# 할 일",
"session.questions": "# 질문",
"session.click_to_expand": "눌러서 펼치기",
Expand Down
13 changes: 12 additions & 1 deletion packages/tui/src/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1525,9 +1525,20 @@ function AssistantMessage(props: { message: AssistantMessage; parts: Part[]; las
const childShortcut = useCommandShortcut("session.child.first")
const backgroundShortcut = useCommandShortcut("session.background")

// A compaction summary is bookkeeping, not an answer: folded to one line, click to open.
const isSummary = createMemo(() => props.message.summary === true)
const [summaryOpen, setSummaryOpen] = createSignal(false)

return (
<>
<For each={props.parts}>
<Show when={isSummary()}>
<box paddingLeft={3} marginTop={1} flexShrink={0} onMouseUp={() => setSummaryOpen((prev) => !prev)}>
<text fg={theme.textMuted}>
{(summaryOpen() ? "▾ " : "▸ ") + language.t("session.compaction.summary")}
</text>
</box>
</Show>
<For each={!isSummary() || summaryOpen() ? props.parts : []}>
{(part, index) => {
const component = createMemo(() => PART_MAPPING[part.type as keyof typeof PART_MAPPING])
return (
Expand Down
Loading