diff --git a/src/App.tsx b/src/App.tsx index fbf3996f..81951b74 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,7 @@ import MessageStream from "./components/message-stream" import PromptInput from "./components/prompt-input" import InfoView from "./components/info-view" import { initMarkdown } from "./lib/markdown" +import { useTheme } from "./lib/theme" import { createCommandRegistry } from "./lib/commands" import type { Command } from "./lib/commands" import { @@ -160,9 +161,14 @@ const SessionView: Component<{ } const App: Component = () => { + const { isDark } = useTheme() const commandRegistry = createCommandRegistry() const [escapeInDebounce, setEscapeInDebounce] = createSignal(false) + createEffect(() => { + void initMarkdown(isDark()).catch(console.error) + }) + const activeInstance = createMemo(() => getActiveInstance()) const activeSessions = createMemo(() => { @@ -634,8 +640,6 @@ const App: Component = () => { } onMount(() => { - initMarkdown(false).catch(console.error) - setEscapeStateChangeHandler(setEscapeInDebounce) setupCommands() diff --git a/src/components/agent-selector.tsx b/src/components/agent-selector.tsx index cf8e4ed4..6e99aed3 100644 --- a/src/components/agent-selector.tsx +++ b/src/components/agent-selector.tsx @@ -64,17 +64,19 @@ export default function AgentSelector(props: AgentSelectorProps) { itemComponent={(itemProps) => (
- + {itemProps.item.rawValue.name} - subagent + + subagent + - + {itemProps.item.rawValue.description.length > 50 ? itemProps.item.rawValue.description.slice(0, 50) + "..." : itemProps.item.rawValue.description} @@ -86,23 +88,25 @@ export default function AgentSelector(props: AgentSelectorProps) { > > - {(state) => Agent: {state.selectedOption()?.name ?? "None"}} + {(state) => ( + Agent: {state.selectedOption()?.name ?? "None"} + )} - + - - + + - +
diff --git a/src/components/instance-tab.tsx b/src/components/instance-tab.tsx index 21c314a6..2da6a1f6 100644 --- a/src/components/instance-tab.tsx +++ b/src/components/instance-tab.tsx @@ -30,7 +30,9 @@ const InstanceTab: Component = (props) => {
-
diff --git a/src/components/session-tabs.tsx b/src/components/session-tabs.tsx index 08164568..aaa25114 100644 --- a/src/components/session-tabs.tsx +++ b/src/components/session-tabs.tsx @@ -19,7 +19,7 @@ const SessionTabs: Component = (props) => { const totalTabs = () => sessionsList().length + 1 return ( -
+
@@ -39,7 +39,7 @@ const SessionTabs: Component = (props) => { onSelect={() => props.onSelect("info")} />