- Implement automatic agent/model selection for new sessions (first agent, prioritize Anthropic default) - Extract and restore agent/model from last assistant message when resuming sessions - Add subagent support: child sessions can select subagents, parent sessions cannot - Display subagent badge in agent dropdown for identification - Truncate agent descriptions to 50 characters in dropdown - Improve model search to include full provider/model ID path - Auto-select input text on focus for easy model search - Add getDefaultModel() with priority: agent model → Anthropic → first provider
43 lines
649 B
TypeScript
43 lines
649 B
TypeScript
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
|
|
model?: {
|
|
providerId: string
|
|
modelId: string
|
|
}
|
|
}
|
|
|
|
export interface Provider {
|
|
id: string
|
|
name: string
|
|
models: Model[]
|
|
defaultModelId?: string
|
|
}
|
|
|
|
export interface Model {
|
|
id: string
|
|
name: string
|
|
providerId: string
|
|
}
|