Przeglądaj źródła

chore: generate

opencode-agent[bot] 3 miesięcy temu
rodzic
commit
fd2278eefc

+ 4 - 1
packages/opencode/src/cli/cmd/run/footer.command.tsx

@@ -329,7 +329,10 @@ export function RunCommandMenuBody(props: {
               category: "Suggested",
               display: "Manage queued prompts",
               footer: `${props.queued().length} queued`,
-              keywords: props.queued().map((item) => item.prompt.text).join(" "),
+              keywords: props
+                .queued()
+                .map((item) => item.prompt.text)
+                .join(" "),
             },
           ]
         : []),

+ 6 - 2
packages/opencode/src/cli/cmd/run/footer.view.tsx

@@ -203,7 +203,9 @@ export function RunFooterView(props: RunFooterViewProps) {
   const subagentShortcut = useKeymapSelector(
     (keymap: OpenTuiKeymap) =>
       formatKeyBindings(
-        keymap.getCommandBindings({ visibility: "registered", commands: ["session.child.first"] }).get("session.child.first"),
+        keymap
+          .getCommandBindings({ visibility: "registered", commands: ["session.child.first"] })
+          .get("session.child.first"),
         props.tuiConfig,
       ) ?? "",
   )
@@ -697,7 +699,9 @@ export function RunFooterView(props: RunFooterViewProps) {
                     gap={1}
                     flexShrink={0}
                   >
-                    <Show when={busy() || exiting() || duration().length > 0 || queuedIndicator() || subagentIndicator()}>
+                    <Show
+                      when={busy() || exiting() || duration().length > 0 || queuedIndicator() || subagentIndicator()}
+                    >
                       <box id="run-direct-footer-hint-left" flexDirection="row" gap={1} flexShrink={0} marginLeft={1}>
                         <Show when={exiting()}>
                           <text id="run-direct-footer-hint-exit" fg={theme().highlight} wrapMode="none" truncate>

+ 0 - 1
packages/opencode/src/cli/cmd/run/runtime.queue.ts

@@ -210,7 +210,6 @@ export async function runPromptQueue(input: QueueInput): Promise<void> {
             if (next.type === "error") {
               throw next.error
             }
-
           } finally {
             if (state.ctrl === ctrl) {
               state.ctrl = undefined

+ 2 - 2
packages/opencode/test/cli/run/footer.view.test.tsx

@@ -198,8 +198,8 @@ async function renderFooter(
           onVariantSelect={() => {}}
           onRows={() => {}}
           onLayout={() => {}}
-           onStatus={() => {}}
-           onQueuedRemove={async () => true}
+          onStatus={() => {}}
+          onQueuedRemove={async () => true}
         />
       </OpencodeKeymapProvider>
     )

+ 3 - 3
packages/opencode/test/cli/run/runtime.queue.test.ts

@@ -326,9 +326,9 @@ describe("run runtime queue", () => {
     const first = ui.events.find((item) => item.type === "queued.prompts")
     const event = ui.events.findLast((item) => item.type === "queued.prompts")
     expect(first?.type === "queued.prompts" ? first.prompts : []).toEqual([])
-    expect(first?.type === "queued.prompts" && event?.type === "queued.prompts" ? first.prompts === event.prompts : true).toBe(
-      false,
-    )
+    expect(
+      first?.type === "queued.prompts" && event?.type === "queued.prompts" ? first.prompts === event.prompts : true,
+    ).toBe(false)
     expect(ui.events.findLast((item) => item.type === "queue")).toEqual({ type: "queue", queue: 1 })
     expect(event?.type === "queued.prompts" ? event.prompts.map((item) => item.prompt.text) : []).toEqual(["two"])
     if (event?.type === "queued.prompts") ui.removeQueued(event.prompts[0]!.messageID)