feat: add opentui interface for opencode

- Add comprehensive TUI interface with React Ink components
- Implement session management, model selection, and command dialogs
- Add theme system with customizable colors and styling
- Integrate with existing opencode server and SDK
- Add todo management and file browsing capabilities
- Include proper TypeScript support and error handling
This commit is contained in:
Dax Raad
2025-09-19 17:21:04 -04:00
parent f1cbdf441c
commit 02848a350c
69 changed files with 3240 additions and 349 deletions
+29
View File
@@ -29,6 +29,7 @@ import { SessionPrompt } from "../session/prompt"
import { SessionCompaction } from "../session/compaction"
import { SessionRevert } from "../session/revert"
import { lazy } from "../util/lazy"
import { Todo } from "../session/todo"
import { InstanceBootstrap } from "../project/bootstrap"
const ERRORS = {
@@ -319,6 +320,34 @@ export namespace Server {
return c.json(session)
},
)
.get(
"/session/:id/todo",
describeRoute({
description: "Get the todo list for a session",
operationId: "session.todo",
responses: {
200: {
description: "Todo list",
content: {
"application/json": {
schema: resolver(Todo.Info.array()),
},
},
},
},
}),
validator(
"param",
z.object({
id: z.string().meta({ description: "Session ID" }),
}),
),
async (c) => {
const sessionID = c.req.valid("param").id
const todos = await Todo.get(sessionID)
return c.json(todos)
},
)
.post(
"/session",
describeRoute({