From d525fbf82940442d8d47265b7d7d0a9af8c282bc Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Wed, 5 Nov 2025 11:55:31 -0600 Subject: feat(desktop): session router, interrupt agent, visual cleanup --- packages/ui/src/components/code.tsx | 5 +++-- packages/ui/src/components/diff.tsx | 1 + packages/ui/src/components/icon.tsx | 1 + packages/ui/src/components/input.tsx | 23 +++++++++++++++++++---- packages/ui/src/components/list.tsx | 8 +++++++- packages/ui/src/components/select-dialog.tsx | 22 ++++++++++++---------- packages/ui/src/components/select.css | 12 ++++++------ packages/ui/src/components/select.tsx | 18 ++++++++++-------- 8 files changed, 59 insertions(+), 31 deletions(-) (limited to 'packages/ui') diff --git a/packages/ui/src/components/code.tsx b/packages/ui/src/components/code.tsx index f1c7efada..a31649788 100644 --- a/packages/ui/src/components/code.tsx +++ b/packages/ui/src/components/code.tsx @@ -11,20 +11,21 @@ export type CodeProps = FileOptions & { export function Code(props: CodeProps) { let container!: HTMLDivElement const [local, others] = splitProps(props, ["file", "class", "classList", "annotations"]) - const file = () => local.file createEffect(() => { const instance = new File({ theme: { dark: "oc-1-dark", light: "oc-1-light" }, // or any Shiki theme overflow: "wrap", // or 'scroll' themeType: "system", // 'system', 'light', or 'dark' + disableFileHeader: true, disableLineNumbers: false, // optional // lang: 'typescript', // optional - auto-detected from filename if not provided ...others, }) + container.innerHTML = "" instance.render({ - file: file(), + file: local.file, lineAnnotations: local.annotations, containerWrapper: container, }) diff --git a/packages/ui/src/components/diff.tsx b/packages/ui/src/components/diff.tsx index f3ca74a88..6297a6422 100644 --- a/packages/ui/src/components/diff.tsx +++ b/packages/ui/src/components/diff.tsx @@ -154,6 +154,7 @@ export function Diff(props: DiffProps) { ...others, }) + container.innerHTML = "" instance.render({ oldFile: local.before, newFile: local.after, diff --git a/packages/ui/src/components/icon.tsx b/packages/ui/src/components/icon.tsx index a2e127290..617997201 100644 --- a/packages/ui/src/components/icon.tsx +++ b/packages/ui/src/components/icon.tsx @@ -150,6 +150,7 @@ const newIcons = { "code-lines": ``, "square-arrow-top-right": ``, "circle-ban-sign": ``, + stop: ``, } export interface IconProps extends ComponentProps<"svg"> { diff --git a/packages/ui/src/components/input.tsx b/packages/ui/src/components/input.tsx index 509e242c9..55e84c3af 100644 --- a/packages/ui/src/components/input.tsx +++ b/packages/ui/src/components/input.tsx @@ -2,22 +2,37 @@ import { TextField as Kobalte } from "@kobalte/core/text-field" import { Show, splitProps } from "solid-js" import type { ComponentProps } from "solid-js" -export interface InputProps extends ComponentProps { +export interface InputProps + extends ComponentProps, + Pick, "value" | "onChange" | "onKeyDown"> { label?: string hideLabel?: boolean description?: string } export function Input(props: InputProps) { - const [local, others] = splitProps(props, ["class", "label", "hideLabel", "description", "placeholder"]) + const [local, others] = splitProps(props, [ + "class", + "label", + "hideLabel", + "description", + "value", + "onChange", + "onKeyDown", + ]) return ( - + {local.label} - + {local.description} diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index aaba61fdf..766979ae6 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -62,7 +62,13 @@ export function List(props: ListProps) { }) return ( - + {(item) => (