Selaa lähdekoodia

chore: generate

opencode-agent[bot] 2 kuukautta sitten
vanhempi
sitoutus
a7bd1cd0d0

+ 3 - 1
packages/opencode/src/cli/cmd/tui/component/prompt/move.tsx

@@ -56,7 +56,9 @@ export function usePromptMove(input: { projectID: () => string | undefined; sess
     dialog.replace(() => (
       <DialogMoveSession
         projectID={projectID}
-        current={homeDestination?.destination() ?? (session ? { type: "directory", directory: session.directory } : undefined)}
+        current={
+          homeDestination?.destination() ?? (session ? { type: "directory", directory: session.directory } : undefined)
+        }
         onSelect={(selection) => {
           const sessionID = input.sessionID()
           if (!sessionID) {

+ 11 - 3
packages/opencode/src/cli/cmd/tui/routes/home/session-destination.tsx

@@ -1,4 +1,12 @@
-import { createContext, createMemo, createSignal, useContext, type Accessor, type ParentProps, type Setter } from "solid-js"
+import {
+  createContext,
+  createMemo,
+  createSignal,
+  useContext,
+  type Accessor,
+  type ParentProps,
+  type Setter,
+} from "solid-js"
 import { useSync } from "../../context/sync"
 
 export type HomeSessionDestination = { type: "directory"; directory: string } | { type: "new" }
@@ -14,8 +22,8 @@ const HomeSessionDestinationContext = createContext<Context>()
 export function HomeSessionDestinationProvider(props: ParentProps) {
   const sync = useSync()
   const [selected, setDestination] = createSignal<HomeSessionDestination>()
-  const destination = createMemo<HomeSessionDestination>(() =>
-    selected() ?? { type: "directory", directory: sync.path.directory || process.cwd() },
+  const destination = createMemo<HomeSessionDestination>(
+    () => selected() ?? { type: "directory", directory: sync.path.directory || process.cwd() },
   )
   return (
     <HomeSessionDestinationContext.Provider

+ 3 - 13
packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

@@ -603,23 +603,13 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
         </Show>
       </box>
       <Show when={props.footer || visibleActions().length} fallback={<box flexShrink={0} />}>
-        <box
-          paddingRight={2}
-          paddingLeft={4}
-          flexDirection="row"
-          justifyContent="space-between"
-          flexShrink={0}
-        >
+        <box paddingRight={2} paddingLeft={4} flexDirection="row" justifyContent="space-between" flexShrink={0}>
           <box flexDirection="row" gap={2}>
             {props.footer}
-            <For each={left()}>
-              {(item) => <FooterAction item={item} />}
-            </For>
+            <For each={left()}>{(item) => <FooterAction item={item} />}</For>
           </box>
           <box flexDirection="row" gap={2}>
-            <For each={right()}>
-              {(item) => <FooterAction item={item} />}
-            </For>
+            <For each={right()}>{(item) => <FooterAction item={item} />}</For>
           </box>
         </box>
       </Show>