GitHub Action 2 месяцев назад
Родитель
Сommit
5cf8e54372

+ 1 - 4
packages/opencode/src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx

@@ -7,10 +7,7 @@ import { useSDK } from "@tui/context/sdk"
 import { useRoute } from "@tui/context/route"
 import { useDialog } from "../../ui/dialog"
 
-export function DialogForkFromTimeline(props: {
-  sessionID: string
-  onMove: (messageID: string) => void
-}) {
+export function DialogForkFromTimeline(props: { sessionID: string; onMove: (messageID: string) => void }) {
   const sync = useSync()
   const dialog = useDialog()
   const sdk = useSDK()

+ 3 - 1
packages/opencode/src/cli/cmd/tui/routes/session/dialog-timeline.tsx

@@ -24,7 +24,9 @@ export function DialogTimeline(props: {
     const result = [] as DialogSelectOption<string>[]
     for (const message of messages) {
       if (message.role !== "user") continue
-      const part = (sync.data.part[message.id] ?? []).find((x) => x.type === "text" && !x.synthetic && !x.ignored,) as TextPart
+      const part = (sync.data.part[message.id] ?? []).find(
+        (x) => x.type === "text" && !x.synthetic && !x.ignored,
+      ) as TextPart
       if (!part) continue
       result.push({
         title: part.text.replace(/\n/g, " "),

+ 8 - 0
packages/sdk/js/src/v2/gen/types.gen.ts

@@ -842,6 +842,14 @@ export type KeybindsConfig = {
    * Show session timeline
    */
   session_timeline?: string
+  /**
+   * Fork session from message
+   */
+  session_fork?: string
+  /**
+   * Rename session
+   */
+  session_rename?: string
   /**
    * Share current session
    */

+ 10 - 0
packages/sdk/openapi.json

@@ -7077,6 +7077,16 @@
             "default": "<leader>g",
             "type": "string"
           },
+          "session_fork": {
+            "description": "Fork session from message",
+            "default": "none",
+            "type": "string"
+          },
+          "session_rename": {
+            "description": "Rename session",
+            "default": "none",
+            "type": "string"
+          },
           "session_share": {
             "description": "Share current session",
             "default": "none",