Browse Source

feat(tui): expose session header slot (#37520)

Kit Langton 4 weeks ago
parent
commit
48adb9521c
2 changed files with 7 additions and 0 deletions
  1. 5 0
      .changeset/calm-sessions-header.md
  2. 2 0
      packages/tui/src/routes/session/index.tsx

+ 5 - 0
.changeset/calm-sessions-header.md

@@ -0,0 +1,5 @@
+---
+"@opencode-ai/cli": patch
+---
+
+Expose a TUI plugin slot at the top of the session view.

+ 2 - 0
packages/tui/src/routes/session/index.tsx

@@ -68,6 +68,7 @@ import { nextThinkingMode, reasoningSummary, type ThinkingMode } from "../../con
 import { getScrollAcceleration } from "../../util/scroll"
 import { collapseToolOutput } from "../../util/collapse-tool-output"
 import { usePluginRuntime } from "../../plugin/runtime"
+import { PluginSlot } from "../../plugin/context"
 import { Keymap, type KeymapCommand } from "../../context/keymap"
 import { usePathFormatter } from "../../context/path-format"
 import { useLocation } from "../../context/location"
@@ -882,6 +883,7 @@ export function Session() {
     >
       <box flexDirection="row" flexGrow={1} minHeight={0}>
         <box flexGrow={1} minHeight={0} paddingBottom={1} paddingLeft={2} paddingRight={2} gap={1}>
+          <PluginSlot name="session.header" input={{ sessionID: route.sessionID }} />
           <Show when={session()}>
             <scrollbox
               ref={(r) => (scroll = r)}