UNPKG

@notebook-intelligence/notebook-intelligence

Version:
75 lines (74 loc) 3.59 kB
import { Signal } from '@lumino/signaling'; import { IChatCompletionResponseEmitter, IChatParticipant, IContextItem, ITelemetryEvent, IToolSelections, RequestDataType } from './tokens'; export declare enum GitHubCopilotLoginStatus { NotLoggedIn = "NOT_LOGGED_IN", ActivatingDevice = "ACTIVATING_DEVICE", LoggingIn = "LOGGING_IN", LoggedIn = "LOGGED_IN" } export interface IDeviceVerificationInfo { verificationURI: string; userCode: string; } export declare enum ClaudeModelType { Default = "", ClaudeOpus45 = "claude-opus-4-5", ClaudeHaiku45 = "claude-haiku-4-5" } export declare enum ClaudeToolType { ClaudeCodeTools = "claude-code:built-in-tools", JupyterUITools = "nbi:built-in-jupyter-ui-tools" } export declare class NBIConfig { get userHomeDir(): string; get userConfigDir(): string; get llmProviders(): [any]; get chatModels(): [any]; get inlineCompletionModels(): [any]; get defaultChatMode(): string; get chatModel(): any; get inlineCompletionModel(): any; get usingGitHubCopilotModel(): boolean; get storeGitHubAccessToken(): boolean; get toolConfig(): any; get mcpServers(): any; getMCPServer(serverId: string): any; getMCPServerPrompt(serverId: string, promptName: string): any; get mcpServerSettings(): any; get claudeSettings(): any; get isInClaudeCodeMode(): boolean; capabilities: any; chatParticipants: IChatParticipant[]; changed: Signal<this, void>; } export declare class NBIAPI { static _loginStatus: GitHubCopilotLoginStatus; static _deviceVerificationInfo: IDeviceVerificationInfo; static _webSocket: WebSocket; static _messageReceived: Signal<unknown, any>; static config: NBIConfig; static configChanged: Signal<NBIConfig, void>; static githubLoginStatusChanged: Signal<unknown, void>; static initialize(): Promise<void>; static initializeWebsocket(): Promise<void>; static getLoginStatus(): GitHubCopilotLoginStatus; static getDeviceVerificationInfo(): IDeviceVerificationInfo; static getGHLoginRequired(): boolean; static getChatEnabled(): any; static getInlineCompletionEnabled(): any; static loginToGitHub(): Promise<unknown>; static logoutFromGitHub(): Promise<unknown>; static updateGitHubLoginStatus(): Promise<void>; static fetchCapabilities(): Promise<void>; static setConfig(config: any): Promise<void>; static updateOllamaModelList(): Promise<void>; static getMCPConfigFile(): Promise<any>; static setMCPConfigFile(config: any): Promise<any>; static chatRequest(messageId: string, chatId: string, prompt: string, language: string, currentDirectory: string, filename: string, additionalContext: IContextItem[], chatMode: string, toolSelections: IToolSelections, responseEmitter: IChatCompletionResponseEmitter): Promise<void>; static reloadMCPServers(): Promise<any>; static generateCode(chatId: string, prompt: string, prefix: string, suffix: string, existingCode: string, language: string, filename: string, responseEmitter: IChatCompletionResponseEmitter): Promise<void>; static sendChatUserInput(messageId: string, data: any): Promise<void>; static sendWebSocketMessage(messageId: string, messageType: RequestDataType, data: any): Promise<void>; static inlineCompletionsRequest(chatId: string, messageId: string, prefix: string, suffix: string, language: string, filename: string, responseEmitter: IChatCompletionResponseEmitter): Promise<void>; static emitTelemetryEvent(event: ITelemetryEvent): Promise<void>; }