|
@@ -200,6 +200,9 @@ export type Part =
|
|
|
| ({
|
|
| ({
|
|
|
type: "patch"
|
|
type: "patch"
|
|
|
} & PatchPart)
|
|
} & PatchPart)
|
|
|
|
|
+ | ({
|
|
|
|
|
+ type: "agent"
|
|
|
|
|
+ } & AgentPart)
|
|
|
|
|
|
|
|
export type TextPart = {
|
|
export type TextPart = {
|
|
|
id: string
|
|
id: string
|
|
@@ -374,6 +377,19 @@ export type PatchPart = {
|
|
|
files: Array<string>
|
|
files: Array<string>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+export type AgentPart = {
|
|
|
|
|
+ id: string
|
|
|
|
|
+ sessionID: string
|
|
|
|
|
+ messageID: string
|
|
|
|
|
+ type: string
|
|
|
|
|
+ name: string
|
|
|
|
|
+ source?: {
|
|
|
|
|
+ value: string
|
|
|
|
|
+ start: number
|
|
|
|
|
+ end: number
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export type EventMessagePartRemoved = {
|
|
export type EventMessagePartRemoved = {
|
|
|
type: string
|
|
type: string
|
|
|
properties: {
|
|
properties: {
|
|
@@ -567,17 +583,19 @@ export type Config = {
|
|
|
*/
|
|
*/
|
|
|
username?: string
|
|
username?: string
|
|
|
/**
|
|
/**
|
|
|
- * Modes configuration, see https://opencode.ai/docs/modes
|
|
|
|
|
|
|
+ * @deprecated Use `agent` field instead.
|
|
|
*/
|
|
*/
|
|
|
mode?: {
|
|
mode?: {
|
|
|
- build?: ModeConfig
|
|
|
|
|
- plan?: ModeConfig
|
|
|
|
|
- [key: string]: ModeConfig | undefined
|
|
|
|
|
|
|
+ build?: AgentConfig
|
|
|
|
|
+ plan?: AgentConfig
|
|
|
|
|
+ [key: string]: AgentConfig | undefined
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * Modes configuration, see https://opencode.ai/docs/modes
|
|
|
|
|
|
|
+ * Agent configuration, see https://opencode.ai/docs/agent
|
|
|
*/
|
|
*/
|
|
|
agent?: {
|
|
agent?: {
|
|
|
|
|
+ plan?: AgentConfig
|
|
|
|
|
+ build?: AgentConfig
|
|
|
general?: AgentConfig
|
|
general?: AgentConfig
|
|
|
[key: string]: AgentConfig | undefined
|
|
[key: string]: AgentConfig | undefined
|
|
|
}
|
|
}
|
|
@@ -704,13 +722,21 @@ export type KeybindsConfig = {
|
|
|
*/
|
|
*/
|
|
|
app_help: string
|
|
app_help: string
|
|
|
/**
|
|
/**
|
|
|
- * Next mode
|
|
|
|
|
|
|
+ * @deprecated use switch_agent. Next mode
|
|
|
*/
|
|
*/
|
|
|
switch_mode: string
|
|
switch_mode: string
|
|
|
/**
|
|
/**
|
|
|
- * Previous Mode
|
|
|
|
|
|
|
+ * @deprecated use switch_agent_reverse. Previous mode
|
|
|
*/
|
|
*/
|
|
|
switch_mode_reverse: string
|
|
switch_mode_reverse: string
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Next agent
|
|
|
|
|
+ */
|
|
|
|
|
+ switch_agent: string
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Previous agent
|
|
|
|
|
+ */
|
|
|
|
|
+ switch_agent_reverse: string
|
|
|
/**
|
|
/**
|
|
|
* Open external editor
|
|
* Open external editor
|
|
|
*/
|
|
*/
|
|
@@ -849,7 +875,7 @@ export type KeybindsConfig = {
|
|
|
app_exit: string
|
|
app_exit: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type ModeConfig = {
|
|
|
|
|
|
|
+export type AgentConfig = {
|
|
|
model?: string
|
|
model?: string
|
|
|
temperature?: number
|
|
temperature?: number
|
|
|
top_p?: number
|
|
top_p?: number
|
|
@@ -858,10 +884,11 @@ export type ModeConfig = {
|
|
|
[key: string]: boolean
|
|
[key: string]: boolean
|
|
|
}
|
|
}
|
|
|
disable?: boolean
|
|
disable?: boolean
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-export type AgentConfig = ModeConfig & {
|
|
|
|
|
- description: string
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Description of when to use the agent
|
|
|
|
|
+ */
|
|
|
|
|
+ description?: string
|
|
|
|
|
+ mode?: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export type Provider = {
|
|
export type Provider = {
|
|
@@ -968,6 +995,17 @@ export type FilePartInput = {
|
|
|
source?: FilePartSource
|
|
source?: FilePartSource
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+export type AgentPartInput = {
|
|
|
|
|
+ id?: string
|
|
|
|
|
+ type: string
|
|
|
|
|
+ name: string
|
|
|
|
|
+ source?: {
|
|
|
|
|
+ value: string
|
|
|
|
|
+ start: number
|
|
|
|
|
+ end: number
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export type Symbol = {
|
|
export type Symbol = {
|
|
|
name: string
|
|
name: string
|
|
|
kind: number
|
|
kind: number
|
|
@@ -984,10 +1022,12 @@ export type File = {
|
|
|
status: "added" | "deleted" | "modified"
|
|
status: "added" | "deleted" | "modified"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type Mode = {
|
|
|
|
|
|
|
+export type Agent = {
|
|
|
name: string
|
|
name: string
|
|
|
- temperature?: number
|
|
|
|
|
|
|
+ description?: string
|
|
|
|
|
+ mode: string
|
|
|
topP?: number
|
|
topP?: number
|
|
|
|
|
+ temperature?: number
|
|
|
model?: {
|
|
model?: {
|
|
|
modelID: string
|
|
modelID: string
|
|
|
providerID: string
|
|
providerID: string
|
|
@@ -1103,25 +1143,25 @@ export type SessionCreateResponses = {
|
|
|
|
|
|
|
|
export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses]
|
|
export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses]
|
|
|
|
|
|
|
|
-export type SessionGetData = {
|
|
|
|
|
|
|
+export type SessionDeleteData = {
|
|
|
body?: never
|
|
body?: never
|
|
|
path: {
|
|
path: {
|
|
|
- sessionID: string
|
|
|
|
|
|
|
+ id: string
|
|
|
}
|
|
}
|
|
|
query?: never
|
|
query?: never
|
|
|
- url: "/session/{sessionID}"
|
|
|
|
|
|
|
+ url: "/session/{id}"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type SessionGetResponses = {
|
|
|
|
|
|
|
+export type SessionDeleteResponses = {
|
|
|
/**
|
|
/**
|
|
|
- * Get session
|
|
|
|
|
|
|
+ * Successfully deleted session
|
|
|
*/
|
|
*/
|
|
|
- 200: Session
|
|
|
|
|
|
|
+ 200: boolean
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]
|
|
|
|
|
|
|
+export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses]
|
|
|
|
|
|
|
|
-export type SessionDeleteData = {
|
|
|
|
|
|
|
+export type SessionGetData = {
|
|
|
body?: never
|
|
body?: never
|
|
|
path: {
|
|
path: {
|
|
|
id: string
|
|
id: string
|
|
@@ -1130,14 +1170,14 @@ export type SessionDeleteData = {
|
|
|
url: "/session/{id}"
|
|
url: "/session/{id}"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type SessionDeleteResponses = {
|
|
|
|
|
|
|
+export type SessionGetResponses = {
|
|
|
/**
|
|
/**
|
|
|
- * Successfully deleted session
|
|
|
|
|
|
|
+ * Get session
|
|
|
*/
|
|
*/
|
|
|
- 200: boolean
|
|
|
|
|
|
|
+ 200: Session
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses]
|
|
|
|
|
|
|
+export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]
|
|
|
|
|
|
|
|
export type SessionInitData = {
|
|
export type SessionInitData = {
|
|
|
body?: {
|
|
body?: {
|
|
@@ -1271,7 +1311,7 @@ export type SessionChatData = {
|
|
|
messageID?: string
|
|
messageID?: string
|
|
|
providerID: string
|
|
providerID: string
|
|
|
modelID: string
|
|
modelID: string
|
|
|
- mode?: string
|
|
|
|
|
|
|
+ agent?: string
|
|
|
system?: string
|
|
system?: string
|
|
|
tools?: {
|
|
tools?: {
|
|
|
[key: string]: boolean
|
|
[key: string]: boolean
|
|
@@ -1283,6 +1323,9 @@ export type SessionChatData = {
|
|
|
| ({
|
|
| ({
|
|
|
type: "file"
|
|
type: "file"
|
|
|
} & FilePartInput)
|
|
} & FilePartInput)
|
|
|
|
|
+ | ({
|
|
|
|
|
+ type: "agent"
|
|
|
|
|
+ } & AgentPartInput)
|
|
|
>
|
|
>
|
|
|
}
|
|
}
|
|
|
path: {
|
|
path: {
|
|
@@ -1556,21 +1599,21 @@ export type AppLogResponses = {
|
|
|
|
|
|
|
|
export type AppLogResponse = AppLogResponses[keyof AppLogResponses]
|
|
export type AppLogResponse = AppLogResponses[keyof AppLogResponses]
|
|
|
|
|
|
|
|
-export type AppModesData = {
|
|
|
|
|
|
|
+export type AppAgentsData = {
|
|
|
body?: never
|
|
body?: never
|
|
|
path?: never
|
|
path?: never
|
|
|
query?: never
|
|
query?: never
|
|
|
- url: "/mode"
|
|
|
|
|
|
|
+ url: "/agent"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type AppModesResponses = {
|
|
|
|
|
|
|
+export type AppAgentsResponses = {
|
|
|
/**
|
|
/**
|
|
|
- * List of modes
|
|
|
|
|
|
|
+ * List of agents
|
|
|
*/
|
|
*/
|
|
|
- 200: Array<Mode>
|
|
|
|
|
|
|
+ 200: Array<Agent>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export type AppModesResponse = AppModesResponses[keyof AppModesResponses]
|
|
|
|
|
|
|
+export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses]
|
|
|
|
|
|
|
|
export type TuiAppendPromptData = {
|
|
export type TuiAppendPromptData = {
|
|
|
body?: {
|
|
body?: {
|