Download packages/kap-server/src/search/docs.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/kap-server/src/search/docs.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/kap-server/src/search/docs.ts
-
curl -L -o docs.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/kap-server/src/search/docs.ts
1.82 kB
| export const MAX_DOC_TEXT_CHARS = 20_000; | |
| export interface MessageDoc { | |
| readonly kind: 'message'; | |
| readonly sessionIdentity?: string; | |
| readonly sessionId: string; | |
| readonly workspaceId: string; | |
| readonly sessionTitle: string; | |
| readonly agentId: string; | |
| readonly role: 'user' | 'assistant'; | |
| readonly text: string; | |
| readonly time: number; | |
| readonly turn?: number; | |
| readonly stepId?: string; | |
| } | |
| export interface TitleDoc { | |
| readonly kind: 'title'; | |
| readonly sessionIdentity?: string; | |
| readonly sessionId: string; | |
| readonly workspaceId: string; | |
| readonly sessionTitle: string; | |
| readonly agentId: ''; | |
| readonly role: 'title'; | |
| readonly text: string; | |
| readonly time: number; | |
| } | |
| export interface TurnOpener { | |
| readonly turn: number; | |
| readonly anchor: boolean; | |
| } | |
| export interface TurnCounterState { | |
| readonly next: number; | |
| readonly hasTurn: boolean; | |
| readonly openers: readonly TurnOpener[]; | |
| } | |
| export interface StepTrackerState { | |
| readonly byUuid: Record<string, number>; | |
| readonly begins: number; | |
| } | |
| export interface FileMetaDoc { | |
| readonly kind: 'fileMeta'; | |
| readonly sessionId: string; | |
| readonly agentId: string; | |
| readonly source: 'root' | 'agents'; | |
| readonly path: string; | |
| readonly offset: number; | |
| readonly size: number; | |
| readonly mtimeMs?: number; | |
| readonly ino?: number; | |
| readonly turnState?: TurnCounterState; | |
| readonly stepState?: StepTrackerState; | |
| } | |
| export interface SessionMetaDoc { | |
| readonly kind: 'sessionMeta'; | |
| readonly title?: string; | |
| readonly dir?: string; | |
| readonly identity?: string; | |
| } | |
| export interface StatsDoc { | |
| readonly kind: 'stats'; | |
| readonly degraded?: string; | |
| readonly sessions: number; | |
| readonly documents: number; | |
| readonly lastIndexedAt: number; | |
| } | |
| export type SearchDoc = MessageDoc | TitleDoc | FileMetaDoc | SessionMetaDoc | StatsDoc; | |