frontend.svelte.ts view source
The base frontend app, typically used by creating your own App extends Frontend.
Gettable with frontend_context.get() inside a <FrontendRoot>.
inheritance
Cell<typeof FrontendJson>
executor
type ActionExecutor
cell_registry
App-wide cell registry, maps class names to constructor and tracks registered instances.
type CellRegistry
action_registry
type ActionRegistry
action_handlers
api
type ActionsApi
peer
type ActionPeer
time
type Time
ui
type Ui
models
type Models
chats
type Chats
threads
type Threads
providers
type Providers
prompts
type Prompts
parts
type Parts
diskfiles
type Diskfiles
actions
type Actions
socket
type Socket
capabilities
type Capabilities
ollama
type Ollama
bots
type ZzzConfig['bots']
provider_status
Tracks which providers are available (configured with API keys).
type Array<ProviderStatus>
tags
type Set<string>
diskfile_histories
type SvelteMap<DiskfilePath, DiskfileHistory>
futuremode
See into Zzz's future.
constructor
type new (options?: FrontendOptions): Frontend
options
EMPTY_OBJECTreceive_session
type (data: { zzz_dir: string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">; scoped_dirs: readonly (string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">)[]; files: { ...; }[]; provider_status: ({ ...; } | { ...; })[]; }): void
data
{ zzz_dir: string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">; scoped_dirs: readonly (string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">)[]; files: { ...; }[]; provider_status: ({ ...; } | { ...; })[]; }voidadd_providers
type (providers_json: { name: "ollama" | "claude" | "chatgpt" | "gemini"; title: string; url: string; homepage: string; company: string; api_key_url: string | null; id?: string | undefined; created?: string | undefined; updated?: string | undefined; }[]): void
providers_json
{ name: "ollama" | "claude" | "chatgpt" | "gemini"; title: string; url: string; homepage: string; company: string; api_key_url: string | null; id?: string | undefined; created?: string | undefined; updated?: string | undefined; }[]voidadd_provider
type (provider_json: { name: "ollama" | "claude" | "chatgpt" | "gemini"; title: string; url: string; homepage: string; company: string; api_key_url: string | null; id?: string | undefined; created?: string | undefined; updated?: string | undefined; }): void
provider_json
{ name: "ollama" | "claude" | "chatgpt" | "gemini"; title: string; url: string; homepage: string; company: string; api_key_url: string | null; id?: string | undefined; created?: string | undefined; updated?: string | undefined; }voidlookup_provider_status
type (provider_name: string): { name: string; available: true; checked_at: number; } | { name: string; available: false; error: string; checked_at: number; } | null
provider_name
string{ name: string; available: true; checked_at: number; } | { name: string; available: false; error: string; checked_at: number; } | nullupdate_provider_status
type (status: { name: string; available: true; checked_at: number; } | { name: string; available: false; error: string; checked_at: number; }): void
status
{ name: string; available: true; checked_at: number; } | { name: string; available: false; error: string; checked_at: number; }voidget_diskfile_history
type (path: string & $brand<"DiskfilePath">): DiskfileHistory | undefined
path
string & $brand<"DiskfilePath">DiskfileHistory | undefinedcreate_diskfile_history
type (path: string & $brand<"DiskfilePath">): DiskfileHistory
path
string & $brand<"DiskfilePath">lookup_action_handler
type (method: "completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu", phase: "send_request" | ... 7 more ... | "execute"): ((event: any) => any) | undefined
method
"completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu"phase
"send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute"((event: any) => any) | undefinedlookup_action_spec
type (method: "completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu"): { ...; } | ... 2 more ... | undefined
method
"completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu"{ method: "completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu"; ... 6 more ...; async: true; } | { ...; } | { ...; } | undefinedlookup_action_input_schema
type <TMethod extends ActionMethod>(method: TMethod): { readonly completion_create: ZodObject<{ completion_request: ZodObject<{ created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; provider_name: ZodEnum<...>; model: ZodString; prompt: ZodString; completion_messages: ZodOptional<...>; }, $strict>; _meta: ZodOptional<...>; }, $strict>; ... 18 more ...; readonly toggle_main_menu: ZodOptional<...>; }[TMethod] | undefined
method
TMethod{ readonly completion_create: ZodObject<{ completion_request: ZodObject<{ created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; provider_name: ZodEnum<{ ollama: "ollama"; claude: "claude"; chatgpt: "chatgpt"; gemini: "gemini"; }>; model: ZodString; prompt: ZodString; completion_messages: ZodOptional<...>; },...lookup_action_output_schema
type <TMethod extends ActionMethod>(method: TMethod): { readonly completion_create: ZodObject<{ completion_response: ZodObject<{ created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; provider_name: ZodEnum<...>; model: ZodString; data: ZodDiscriminatedUnion<...>; }, $strict>; _meta: ZodOptional<...>; }, $strict>; ... 18 more ...; readonly toggle_main_menu: ZodObject<...>; }[TMethod] | undefined
method
TMethod{ readonly completion_create: ZodObject<{ completion_response: ZodObject<{ created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; provider_name: ZodEnum<{ ollama: "ollama"; claude: "claude"; chatgpt: "chatgpt"; gemini: "gemini"; }>; model: ZodString; data: ZodDiscriminatedUnion<...>; }, $strict>; _meta: ZodOp...is_valid_phase_for_method
type (method: "completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu", phase: "send_request" | ... 7 more ... | "execute"): boolean
method
"completion_create" | "completion_progress" | "directory_create" | "diskfile_delete" | "diskfile_update" | "filer_change" | "ollama_copy" | "ollama_create" | "ollama_delete" | ... 10 more ... | "toggle_main_menu"phase
"send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute"boolean