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
5 changes: 5 additions & 0 deletions .changeset/answered-questions-expanded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Keep answered questions expanded in chat history and improve their text wrapping.
27 changes: 27 additions & 0 deletions packages/kilo-ui/src/components/message-part.css
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,34 @@ html[data-theme="kilo-vscode"] [data-component="todos"] {
}

[data-component="question-answers"] {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px;
font-family: var(--font-family-sans);
font-size: var(--kilo-font-size-13);
line-height: var(--line-height-large);

[data-slot="question-answer-item"] {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}

[data-slot="question-text"],
[data-slot="answer-text"] {
min-width: 0;
overflow-wrap: anywhere;
}

[data-slot="question-text"] {
color: var(--text-weak);
}

[data-slot="answer-text"] {
color: var(--text-strong);
}
}

@keyframes reasoning-card-down {
Expand Down
2 changes: 1 addition & 1 deletion packages/kilo-ui/src/components/message-part.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3171,7 +3171,7 @@ ToolRegistry.register({
return (
<BasicTool
{...props}
defaultOpen={false}
defaultOpen={completed() && !dismissed()}
icon="bubble-5"
trigger={
<ToolTriggerRow
Expand Down
8 changes: 4 additions & 4 deletions packages/kilo-ui/src/stories/message-part.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export const ToolHintErrors: Story = {
),
}

// --- Question tool: answered (collapsed) ---
// --- Question tool: answered (expanded by default) ---

export const QuestionAnswered: Story = {
name: "QuestionAnswered",
Expand All @@ -628,10 +628,10 @@ export const QuestionAnswered: Story = {
),
}

// --- Question tool: answered (expanded) ---
// --- Question tool: answered (manually collapsed) ---

export const QuestionAnsweredExpanded: Story = {
name: "QuestionAnswered (expanded)",
export const QuestionAnsweredCollapsed: Story = {
name: "QuestionAnswered (manually collapsed)",
render: () => (
<AllProviders data={mockDataQuestionAnswered}>
<AssistantParts messages={[mockAssistantMessage]} />
Expand Down
Loading