Buckets:
| import type { EditorTraits } from "@opentui/core" | |
| export type PromptMode = "normal" | "shell" | |
| export interface PromptTraitsInput { | |
| mode: PromptMode | |
| autocompleteVisible: boolean | |
| } | |
| export type PromptTraits = EditorTraits & { | |
| owner: "opencode" | |
| role: "prompt" | |
| } | |
| /** The managed textarea keymap owns `suspend`; these traits only describe capture and status. */ | |
| export function computePromptTraits(input: PromptTraitsInput): PromptTraits { | |
| const capture = | |
| input.mode === "normal" | |
| ? input.autocompleteVisible | |
| ? (["escape", "navigate", "submit", "tab"] as const) | |
| : (["tab"] as const) | |
| : undefined | |
| return { | |
| capture, | |
| status: input.mode === "shell" ? "SHELL" : undefined, | |
| owner: "opencode", | |
| role: "prompt", | |
| } | |
| } | |
Xet Storage Details
- Size:
- 765 Bytes
- Xet hash:
- 77563c973a843ad279f86868f94c34bc0cc842bcbaa4c73480d6ef71befa4f24
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.