Tweak control panel plan styling

This commit is contained in:
Shantur Rathore
2025-12-14 23:36:38 +00:00
parent c00b29145a
commit 8ec57da275
2 changed files with 11 additions and 7 deletions

View File

@@ -851,7 +851,7 @@ const InstanceShell2: Component<InstanceShellProps> = (props) => {
if (!todoState) {
return <p class="text-xs text-secondary">Nothing planned yet.</p>
}
return <TodoListView state={todoState} emptyLabel="Nothing planned yet." />
return <TodoListView state={todoState} emptyLabel="Nothing planned yet." showStatusLabel={false} />
}
const sections = [

View File

@@ -1,4 +1,4 @@
import { For } from "solid-js"
import { For, Show } from "solid-js"
import type { ToolState } from "@opencode-ai/sdk"
import type { ToolRenderer } from "../types"
import { readToolStatePayload } from "../utils"
@@ -61,6 +61,7 @@ function getTodoStatusLabel(status: TodoViewStatus): string {
interface TodoListViewProps {
state?: ToolState
emptyLabel?: string
showStatusLabel?: boolean
}
export function TodoListView(props: TodoListViewProps) {
@@ -88,12 +89,15 @@ export function TodoListView(props: TodoListViewProps) {
role="listitem"
>
<span class="tool-call-todo-checkbox" data-status={todo.status} aria-label={label}></span>
<div class="tool-call-todo-body">
<div class="tool-call-todo-heading">
<span class="tool-call-todo-text">{todo.content}</span>
<span class={`tool-call-todo-status tool-call-todo-status-${todo.status}`}>{label}</span>
<div class="tool-call-todo-body">
<div class="tool-call-todo-heading">
<span class="tool-call-todo-text">{todo.content}</span>
<Show when={props.showStatusLabel !== false}>
<span class={`tool-call-todo-status tool-call-todo-status-${todo.status}`}>{label}</span>
</Show>
</div>
</div>
</div>
</div>
)
}}