feat(tui): expose session header slot (#37520)
This commit is contained in:
parent
9b3a4655f1
commit
48adb9521c
2 changed files with 7 additions and 0 deletions
5
.changeset/calm-sessions-header.md
Normal file
5
.changeset/calm-sessions-header.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@opencode-ai/cli": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Expose a TUI plugin slot at the top of the session view.
|
||||||
|
|
@ -68,6 +68,7 @@ import { nextThinkingMode, reasoningSummary, type ThinkingMode } from "../../con
|
||||||
import { getScrollAcceleration } from "../../util/scroll"
|
import { getScrollAcceleration } from "../../util/scroll"
|
||||||
import { collapseToolOutput } from "../../util/collapse-tool-output"
|
import { collapseToolOutput } from "../../util/collapse-tool-output"
|
||||||
import { usePluginRuntime } from "../../plugin/runtime"
|
import { usePluginRuntime } from "../../plugin/runtime"
|
||||||
|
import { PluginSlot } from "../../plugin/context"
|
||||||
import { Keymap, type KeymapCommand } from "../../context/keymap"
|
import { Keymap, type KeymapCommand } from "../../context/keymap"
|
||||||
import { usePathFormatter } from "../../context/path-format"
|
import { usePathFormatter } from "../../context/path-format"
|
||||||
import { useLocation } from "../../context/location"
|
import { useLocation } from "../../context/location"
|
||||||
|
|
@ -882,6 +883,7 @@ export function Session() {
|
||||||
>
|
>
|
||||||
<box flexDirection="row" flexGrow={1} minHeight={0}>
|
<box flexDirection="row" flexGrow={1} minHeight={0}>
|
||||||
<box flexGrow={1} minHeight={0} paddingBottom={1} paddingLeft={2} paddingRight={2} gap={1}>
|
<box flexGrow={1} minHeight={0} paddingBottom={1} paddingLeft={2} paddingRight={2} gap={1}>
|
||||||
|
<PluginSlot name="session.header" input={{ sessionID: route.sessionID }} />
|
||||||
<Show when={session()}>
|
<Show when={session()}>
|
||||||
<scrollbox
|
<scrollbox
|
||||||
ref={(r) => (scroll = r)}
|
ref={(r) => (scroll = r)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue