|
@@ -10,6 +10,7 @@ import { Select } from "@opencode-ai/ui/select"
|
|
|
import { TextField } from "@opencode-ai/ui/text-field"
|
|
import { TextField } from "@opencode-ai/ui/text-field"
|
|
|
import { Tooltip } from "@opencode-ai/ui/tooltip"
|
|
import { Tooltip } from "@opencode-ai/ui/tooltip"
|
|
|
import { base64Decode } from "@opencode-ai/util/encode"
|
|
import { base64Decode } from "@opencode-ai/util/encode"
|
|
|
|
|
+import { useCommand } from "@/context/command"
|
|
|
import { getFilename } from "@opencode-ai/util/path"
|
|
import { getFilename } from "@opencode-ai/util/path"
|
|
|
import { A, useParams } from "@solidjs/router"
|
|
import { A, useParams } from "@solidjs/router"
|
|
|
import { createMemo, createResource, Show } from "solid-js"
|
|
import { createMemo, createResource, Show } from "solid-js"
|
|
@@ -24,6 +25,7 @@ export function Header(props: {
|
|
|
const globalSDK = useGlobalSDK()
|
|
const globalSDK = useGlobalSDK()
|
|
|
const layout = useLayout()
|
|
const layout = useLayout()
|
|
|
const params = useParams()
|
|
const params = useParams()
|
|
|
|
|
+ const command = useCommand()
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<header class="h-12 shrink-0 bg-background-base border-b border-border-weak-base flex" data-tauri-drag-region>
|
|
<header class="h-12 shrink-0 bg-background-base border-b border-border-weak-base flex" data-tauri-drag-region>
|
|
@@ -80,9 +82,18 @@ export function Header(props: {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<Show when={currentSession()}>
|
|
<Show when={currentSession()}>
|
|
|
- <Button as={A} href={`/${params.dir}/session`} icon="plus-small">
|
|
|
|
|
- New session
|
|
|
|
|
- </Button>
|
|
|
|
|
|
|
+ <Tooltip
|
|
|
|
|
+ value={
|
|
|
|
|
+ <div class="flex items-center gap-2">
|
|
|
|
|
+ <span>New session</span>
|
|
|
|
|
+ <span class="text-icon-base text-12-medium">{command.keybind("session.new")}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ }
|
|
|
|
|
+ >
|
|
|
|
|
+ <Button as={A} href={`/${params.dir}/session`} icon="plus-small">
|
|
|
|
|
+ New session
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </Tooltip>
|
|
|
</Show>
|
|
</Show>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex items-center gap-4">
|
|
<div class="flex items-center gap-4">
|
|
@@ -91,7 +102,7 @@ export function Header(props: {
|
|
|
value={
|
|
value={
|
|
|
<div class="flex items-center gap-2">
|
|
<div class="flex items-center gap-2">
|
|
|
<span>Toggle terminal</span>
|
|
<span>Toggle terminal</span>
|
|
|
- <span class="text-icon-base text-12-medium">Ctrl `</span>
|
|
|
|
|
|
|
+ <span class="text-icon-base text-12-medium">{command.keybind("terminal.toggle")}</span>
|
|
|
</div>
|
|
</div>
|
|
|
}
|
|
}
|
|
|
>
|
|
>
|