sync
parent
0e676dce85
commit
2fbdbe1dd1
|
|
@ -15,7 +15,8 @@ export namespace Agent {
|
|||
name: z.string(),
|
||||
description: z.string().optional(),
|
||||
mode: z.enum(["subagent", "primary", "all"]),
|
||||
internal: z.boolean(),
|
||||
native: z.boolean().optional(),
|
||||
hidden: z.boolean().optional(),
|
||||
topP: z.number().optional(),
|
||||
temperature: z.number().optional(),
|
||||
color: z.string().optional(),
|
||||
|
|
@ -114,7 +115,8 @@ export namespace Agent {
|
|||
options: {},
|
||||
permission: agentPermission,
|
||||
mode: "subagent",
|
||||
internal: true,
|
||||
native: true,
|
||||
hidden: true,
|
||||
},
|
||||
explore: {
|
||||
name: "explore",
|
||||
|
|
@ -149,12 +151,13 @@ export namespace Agent {
|
|||
options: {},
|
||||
permission: agentPermission,
|
||||
mode: "subagent",
|
||||
internal: true,
|
||||
native: true,
|
||||
},
|
||||
compaction: {
|
||||
name: "compaction",
|
||||
mode: "primary",
|
||||
internal: true,
|
||||
native: true,
|
||||
hidden: true,
|
||||
prompt: PROMPT_COMPACTION,
|
||||
tools: {
|
||||
"*": false,
|
||||
|
|
@ -168,13 +171,13 @@ export namespace Agent {
|
|||
options: {},
|
||||
permission: agentPermission,
|
||||
mode: "primary",
|
||||
internal: true,
|
||||
native: true,
|
||||
},
|
||||
summary: {
|
||||
name: "summary",
|
||||
mode: "subagent",
|
||||
options: {},
|
||||
internal: true,
|
||||
native: true,
|
||||
permission: agentPermission,
|
||||
prompt: `You are a title generator. You output ONLY a thread title. Nothing else.
|
||||
|
||||
|
|
@ -223,7 +226,7 @@ Your output must be:
|
|||
...defaultTools,
|
||||
},
|
||||
mode: "primary",
|
||||
internal: true,
|
||||
native: true,
|
||||
},
|
||||
}
|
||||
for (const [key, value] of Object.entries(cfg.agent ?? {})) {
|
||||
|
|
@ -239,7 +242,7 @@ Your output must be:
|
|||
permission: agentPermission,
|
||||
options: {},
|
||||
tools: {},
|
||||
internal: false,
|
||||
native: false,
|
||||
}
|
||||
const {
|
||||
name,
|
||||
|
|
|
|||
|
|
@ -227,8 +227,8 @@ const AgentListCommand = cmd({
|
|||
async fn() {
|
||||
const agents = await Agent.list()
|
||||
const sortedAgents = agents.sort((a, b) => {
|
||||
if (a.internal !== b.internal) {
|
||||
return a.internal ? -1 : 1
|
||||
if (a.native !== b.native) {
|
||||
return a.native ? -1 : 1
|
||||
}
|
||||
return a.name.localeCompare(b.name)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function DialogAgent() {
|
|||
return {
|
||||
value: item.name,
|
||||
title: item.name,
|
||||
description: item.builtIn ? "native" : item.description,
|
||||
description: item.internal ? "native" : item.description,
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export function Autocomplete(props: {
|
|||
const agents = createMemo(() => {
|
||||
const agents = sync.data.agent
|
||||
return agents
|
||||
.filter((agent) => !agent.builtIn && agent.mode !== "primary")
|
||||
.filter((agent) => !agent.hidden && agent.mode !== "primary")
|
||||
.map(
|
||||
(agent): AutocompleteOption => ({
|
||||
display: "@" + agent.name,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||
})
|
||||
|
||||
const agent = iife(() => {
|
||||
const agents = createMemo(() => sync.data.agent.filter((x) => x.mode !== "subagent"))
|
||||
const agents = createMemo(() => sync.data.agent.filter((x) => x.mode !== "subagent" && !x.hidden))
|
||||
const [agentStore, setAgentStore] = createStore<{
|
||||
current: string
|
||||
}>({
|
||||
|
|
|
|||
|
|
@ -1203,10 +1203,10 @@ export class Session extends HeyApiClient {
|
|||
}
|
||||
agent?: string
|
||||
noReply?: boolean
|
||||
system?: string
|
||||
tools?: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
system?: string
|
||||
parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
|
|
@ -1222,8 +1222,8 @@ export class Session extends HeyApiClient {
|
|||
{ in: "body", key: "model" },
|
||||
{ in: "body", key: "agent" },
|
||||
{ in: "body", key: "noReply" },
|
||||
{ in: "body", key: "system" },
|
||||
{ in: "body", key: "tools" },
|
||||
{ in: "body", key: "system" },
|
||||
{ in: "body", key: "parts" },
|
||||
],
|
||||
},
|
||||
|
|
@ -1289,10 +1289,10 @@ export class Session extends HeyApiClient {
|
|||
}
|
||||
agent?: string
|
||||
noReply?: boolean
|
||||
system?: string
|
||||
tools?: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
system?: string
|
||||
parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
|
|
@ -1308,8 +1308,8 @@ export class Session extends HeyApiClient {
|
|||
{ in: "body", key: "model" },
|
||||
{ in: "body", key: "agent" },
|
||||
{ in: "body", key: "noReply" },
|
||||
{ in: "body", key: "system" },
|
||||
{ in: "body", key: "tools" },
|
||||
{ in: "body", key: "system" },
|
||||
{ in: "body", key: "parts" },
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ export type AssistantMessage = {
|
|||
modelID: string
|
||||
providerID: string
|
||||
mode: string
|
||||
agent: string
|
||||
path: {
|
||||
cwd: string
|
||||
root: string
|
||||
|
|
@ -504,13 +505,6 @@ export type EventSessionIdle = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventSessionCompacted = {
|
||||
type: "session.compacted"
|
||||
properties: {
|
||||
sessionID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventFileEdited = {
|
||||
type: "file.edited"
|
||||
properties: {
|
||||
|
|
@ -545,6 +539,13 @@ export type EventTodoUpdated = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventSessionCompacted = {
|
||||
type: "session.compacted"
|
||||
properties: {
|
||||
sessionID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCommandExecuted = {
|
||||
type: "command.executed"
|
||||
properties: {
|
||||
|
|
@ -747,9 +748,9 @@ export type Event =
|
|||
| EventPermissionReplied
|
||||
| EventSessionStatus
|
||||
| EventSessionIdle
|
||||
| EventSessionCompacted
|
||||
| EventFileEdited
|
||||
| EventTodoUpdated
|
||||
| EventSessionCompacted
|
||||
| EventCommandExecuted
|
||||
| EventSessionCreated
|
||||
| EventSessionUpdated
|
||||
|
|
@ -1734,7 +1735,8 @@ export type Agent = {
|
|||
name: string
|
||||
description?: string
|
||||
mode: "subagent" | "primary" | "all"
|
||||
builtIn: boolean
|
||||
native?: boolean
|
||||
hidden?: boolean
|
||||
topP?: number
|
||||
temperature?: number
|
||||
color?: string
|
||||
|
|
@ -2797,10 +2799,10 @@ export type SessionPromptData = {
|
|||
}
|
||||
agent?: string
|
||||
noReply?: boolean
|
||||
system?: string
|
||||
tools?: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
system?: string
|
||||
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>
|
||||
}
|
||||
path: {
|
||||
|
|
@ -2892,10 +2894,10 @@ export type SessionPromptAsyncData = {
|
|||
}
|
||||
agent?: string
|
||||
noReply?: boolean
|
||||
system?: string
|
||||
tools?: {
|
||||
[key: string]: boolean
|
||||
}
|
||||
system?: string
|
||||
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>
|
||||
}
|
||||
path: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue