mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 23:59:45 +08:00
- Add session-based user data persistence using Electron partitions - Implement multi-tab support with tab management operations - Add new tools: create_tab, list_tabs, close_tab, switch_tab - Update existing tools (open, execute, fetch, reset) to support tabId parameter - Refactor controller to manage sessions with multiple tabs - Add comprehensive documentation in README.md - Add TypeScript interfaces for SessionInfo and TabInfo BREAKING CHANGE: Controller now manages sessions with tabs instead of single windows per session
23 lines
804 B
TypeScript
23 lines
804 B
TypeScript
export { ExecuteSchema, executeToolDefinition, handleExecute } from './execute'
|
|
export { handleOpen, OpenSchema, openToolDefinition } from './open'
|
|
export { handleReset, resetToolDefinition } from './reset'
|
|
|
|
import type { CdpBrowserController } from '../controller'
|
|
import { executeToolDefinition, handleExecute } from './execute'
|
|
import { handleOpen, openToolDefinition } from './open'
|
|
import { handleReset, resetToolDefinition } from './reset'
|
|
|
|
export const toolDefinitions = [openToolDefinition, executeToolDefinition, resetToolDefinition]
|
|
|
|
export const toolHandlers: Record<
|
|
string,
|
|
(
|
|
controller: CdpBrowserController,
|
|
args: unknown
|
|
) => Promise<{ content: { type: string; text: string }[]; isError: boolean }>
|
|
> = {
|
|
open: handleOpen,
|
|
execute: handleExecute,
|
|
reset: handleReset
|
|
}
|