Working messages display

This commit is contained in:
Shantur Rathore
2025-10-22 22:10:51 +01:00
commit fa77b4e82e
53 changed files with 9336 additions and 0 deletions

9
src/types/electron.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
import type { ElectronAPI } from "../../electron/preload/index"
declare global {
interface Window {
electronAPI: ElectronAPI
}
}
export {}

17
src/types/instance.ts Normal file
View File

@@ -0,0 +1,17 @@
import type { OpencodeClient } from "@opencode-ai/sdk/client"
export interface Instance {
id: string
folder: string
port: number
pid: number
status: "starting" | "ready" | "error" | "stopped"
error?: string
client: OpencodeClient | null
}
export interface LogEntry {
timestamp: number
level: "info" | "error"
message: string
}

8
src/types/message.ts Normal file
View File

@@ -0,0 +1,8 @@
export interface Message {
id: string
sessionId: string
type: "user" | "assistant"
parts: any[]
timestamp: number
status: "sending" | "sent" | "streaming" | "complete" | "error"
}

37
src/types/session.ts Normal file
View File

@@ -0,0 +1,37 @@
import type { Message } from "./message"
export interface Session {
id: string
instanceId: string
title: string
parentId: string | null
agent: string
model: {
providerId: string
modelId: string
}
time: {
created: number
updated: number
}
messages: Message[]
messagesInfo: Map<string, any>
}
export interface Agent {
name: string
description: string
mode: string
}
export interface Provider {
id: string
name: string
models: Model[]
}
export interface Model {
id: string
name: string
providerId: string
}