mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-08-31 09:31:24 +02:00
6de1b63473
* base : slash-command/misc foundation - model icon and focus-selector constants * feat : slash-command picker and command parsing helpers * refactor : wire command and @-mention pickers into the chat form * ui : improve model selector keyboard navigation and load/dismiss * feat: Unify markdown/raw-text rendering under one setting with migration * fix: Misc fixes - tool-call subtitle, assistant wrap, progress guards * feat: Clamp and style numeric settings inputs from registry bounds
154 lines
3.5 KiB
TypeScript
154 lines
3.5 KiB
TypeScript
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
// for information about these interfaces
|
|
|
|
import 'vite-plugin-pwa/pwa-assets';
|
|
import 'vite-plugin-pwa/svelte';
|
|
|
|
// Import chat types from dedicated module
|
|
|
|
import type {
|
|
// API types
|
|
ApiChatCompletionRequest,
|
|
ApiChatCompletionResponse,
|
|
ApiChatCompletionStreamChunk,
|
|
ApiChatCompletionToolCall,
|
|
ApiChatCompletionToolCallDelta,
|
|
ApiChatMessageData,
|
|
ApiChatMessageContentPart,
|
|
ApiContextSizeError,
|
|
ApiErrorResponse,
|
|
ApiLlamaCppServerProps,
|
|
ApiModelDataEntry,
|
|
ApiModelLoadStage,
|
|
ApiModelsSseProgress,
|
|
ApiModelsSseData,
|
|
ApiModelsSseEvent,
|
|
ApiModelListResponse,
|
|
ApiProcessingState,
|
|
ApiRouterModelMeta,
|
|
ApiRouterModelsLoadRequest,
|
|
ApiRouterModelsLoadResponse,
|
|
ApiRouterModelsStatusRequest,
|
|
ApiRouterModelsStatusResponse,
|
|
ApiRouterModelsListResponse,
|
|
ApiRouterModelsUnloadRequest,
|
|
ApiRouterModelsUnloadResponse,
|
|
// Chat types
|
|
ChatAttachmentDisplayItem,
|
|
ChatMessageType,
|
|
ChatRole,
|
|
ChatUploadedFile,
|
|
ChatMessageSiblingInfo,
|
|
ChatMessagePromptProgress,
|
|
ChatMessageTimings,
|
|
// Database types
|
|
DatabaseConversation,
|
|
DatabaseMessage,
|
|
DatabaseMessageExtra,
|
|
DatabaseMessageExtraAudioFile,
|
|
DatabaseMessageExtraVideoFile,
|
|
DatabaseMessageExtraImageFile,
|
|
DatabaseMessageExtraTextFile,
|
|
DatabaseMessageExtraPdfFile,
|
|
DatabaseMessageExtraLegacyContext,
|
|
ExportedConversation,
|
|
ExportedConversations,
|
|
// Model types
|
|
ModelModalities,
|
|
ModelOption,
|
|
ModelLoadProgress,
|
|
// Settings types
|
|
SettingsChatServiceOptions,
|
|
SettingsConfigValue,
|
|
SettingsFieldConfig,
|
|
SettingsConfigType
|
|
} from '$lib/types';
|
|
|
|
import { ServerRole, ServerModelStatus, ModelModality } from '$lib/enums';
|
|
|
|
declare global {
|
|
// namespace App {
|
|
// interface Error {}
|
|
// interface Locals {}
|
|
// interface PageData {}
|
|
// interface PageState {}
|
|
// interface Platform {}
|
|
// }
|
|
|
|
export {
|
|
// API types
|
|
ApiChatCompletionRequest,
|
|
ApiChatCompletionResponse,
|
|
ApiChatCompletionStreamChunk,
|
|
ApiChatCompletionToolCall,
|
|
ApiChatCompletionToolCallDelta,
|
|
ApiChatMessageData,
|
|
ApiChatMessageContentPart,
|
|
ApiContextSizeError,
|
|
ApiErrorResponse,
|
|
ApiLlamaCppServerProps,
|
|
ApiModelDataEntry,
|
|
ApiModelLoadStage,
|
|
ApiModelsSseProgress,
|
|
ApiModelsSseData,
|
|
ApiModelsSseEvent,
|
|
ApiModelListResponse,
|
|
ApiProcessingState,
|
|
ApiRouterModelMeta,
|
|
ApiRouterModelsLoadRequest,
|
|
ApiRouterModelsLoadResponse,
|
|
ApiRouterModelsStatusRequest,
|
|
ApiRouterModelsStatusResponse,
|
|
ApiRouterModelsListResponse,
|
|
ApiRouterModelsUnloadRequest,
|
|
ApiRouterModelsUnloadResponse,
|
|
// Chat types
|
|
ChatAttachmentDisplayItem,
|
|
ChatMessagePromptProgress,
|
|
ChatMessageSiblingInfo,
|
|
ChatMessageTimings,
|
|
ChatMessageType,
|
|
ChatRole,
|
|
ChatUploadedFile,
|
|
// Database types
|
|
DatabaseConversation,
|
|
DatabaseMessage,
|
|
DatabaseMessageExtra,
|
|
DatabaseMessageExtraAudioFile,
|
|
DatabaseMessageExtraVideoFile,
|
|
DatabaseMessageExtraImageFile,
|
|
DatabaseMessageExtraTextFile,
|
|
DatabaseMessageExtraPdfFile,
|
|
DatabaseMessageExtraLegacyContext,
|
|
ExportedConversation,
|
|
ExportedConversations,
|
|
// Enum types
|
|
ModelModality,
|
|
ServerRole,
|
|
ServerModelStatus,
|
|
// Model types
|
|
ModelModalities,
|
|
ModelOption,
|
|
ModelLoadProgress,
|
|
// Settings types
|
|
SettingsChatServiceOptions,
|
|
SettingsConfigValue,
|
|
SettingsFieldConfig,
|
|
SettingsConfigType
|
|
};
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
idxThemeStyle?: number;
|
|
idxCodeBlock?: number;
|
|
|
|
// File System Access API - not in the DOM lib and unavailable in some browsers
|
|
showDirectoryPicker?: (options?: {
|
|
id?: string;
|
|
mode?: 'read' | 'readwrite';
|
|
startIn?: FileSystemHandle | string;
|
|
}) => Promise<FileSystemDirectoryHandle>;
|
|
}
|
|
}
|