diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-move-session.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-move-session.tsx index 4faa624baba..847d272946b 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-move-session.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-move-session.tsx @@ -16,9 +16,7 @@ import { useProject } from "@tui/context/project" import { Spinner } from "./spinner" import { DialogWorkspaceFileChanges } from "./dialog-workspace-file-changes" -export type MoveSessionSelection = - | { type: "directory"; directory: string; subdirectory: boolean } - | { type: "new" } +export type MoveSessionSelection = { type: "directory"; directory: string; subdirectory: boolean } | { type: "new" } export function DialogMoveSession(props: { projectID: string @@ -114,15 +112,14 @@ export function DialogMoveSession(props: { const isRemoving = removing() === item.location return { title: isRemoving ? `Deleting ${item.location}` : deleting ? `Press ${deleteHint()} again to confirm` : title, - titleView: - isRemoving ? ( - Deleting {item.location} - ) : !deleting && suffix ? ( - <> - {visible.slice(0, split)} - {visible.slice(split)} - - ) : undefined, + titleView: isRemoving ? ( + Deleting {item.location} + ) : !deleting && suffix ? ( + <> + {visible.slice(0, split)} + {visible.slice(split)} + + ) : undefined, bg: deleting ? theme.error : undefined, value: { type: "directory", directory: item.location, subdirectory: item.location !== item.root } as const, category: item.root === main ? "Project" : "Working copies", @@ -136,9 +133,7 @@ export function DialogMoveSession(props: { if (directories.loading || loadedProject.loading || !props.current) return if (props.current.type === "new") return props.current const directory = props.current.directory - return options().find( - (option) => option.value?.type === "directory" && option.value.directory === directory, - )?.value + return options().find((option) => option.value?.type === "directory" && option.value.directory === directory)?.value }) async function remove(option: DialogSelectOption) { diff --git a/packages/opencode/src/cli/cmd/tui/feature-plugins/system/plugins.tsx b/packages/opencode/src/cli/cmd/tui/feature-plugins/system/plugins.tsx index 43086eb460c..9c48efa976d 100644 --- a/packages/opencode/src/cli/cmd/tui/feature-plugins/system/plugins.tsx +++ b/packages/opencode/src/cli/cmd/tui/feature-plugins/system/plugins.tsx @@ -205,19 +205,19 @@ function View(props: { api: TuiPluginApi }) { current={cur()} onMove={(item) => setCur(item.value)} actions={[ - { - title: "toggle", - command: "plugins.toggle", - hidden: lock(), + { + title: "toggle", + command: "plugins.toggle", + hidden: lock(), onTrigger: (item) => { setCur(item.value) flip(item.value) }, }, - { - title: "install", - command: "dialog.plugins.install", - hidden: lock(), + { + title: "install", + command: "dialog.plugins.install", + hidden: lock(), onTrigger: () => { showInstall(props.api) }, diff --git a/packages/opencode/src/cli/cmd/tui/routes/home/session-destination.tsx b/packages/opencode/src/cli/cmd/tui/routes/home/session-destination.tsx index e08d59a0a43..156244f6c25 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/home/session-destination.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/home/session-destination.tsx @@ -9,9 +9,7 @@ import { } from "solid-js" import { useSync } from "../../context/sync" -export type HomeSessionDestination = - | { type: "directory"; directory: string; subdirectory: boolean } - | { type: "new" } +export type HomeSessionDestination = { type: "directory"; directory: string; subdirectory: boolean } | { type: "new" } type Context = { destination: Accessor @@ -24,8 +22,8 @@ const HomeSessionDestinationContext = createContext() export function HomeSessionDestinationProvider(props: ParentProps) { const sync = useSync() const [selected, setDestination] = createSignal() - const destination = createMemo(() => - selected() ?? { type: "directory", directory: sync.path.directory || process.cwd(), subdirectory: false }, + const destination = createMemo( + () => selected() ?? { type: "directory", directory: sync.path.directory || process.cwd(), subdirectory: false }, ) return ( (props: DialogSelectProps) { .filter((item) => item.label), ...(props.footerHints ?? []), ]) - const actionItems = createMemo(() => visibleActions().filter(isActionItem).filter((item) => !isActionDisabled(item))) + const actionItems = createMemo(() => + visibleActions() + .filter(isActionItem) + .filter((item) => !isActionDisabled(item)), + ) createEffect(() => { const index = focusedAction() @@ -550,7 +554,7 @@ export function DialogSelect(props: DialogSelectProps) { {(option) => { - const active = createMemo(() => !props.locked && isDeepEqual(option.value, selected()?.value)) + const active = createMemo(() => !props.locked && isDeepEqual(option.value, selected()?.value)) const current = createMemo(() => isDeepEqual(option.value, props.current)) return (