@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
63 lines • 2.86 kB
TypeScript
import React from 'react';
import { CustomCommandExecutor } from '../custom-commands/executor.js';
import { CustomCommandLoader } from '../custom-commands/loader.js';
import type { CheckpointListItem, DevelopmentMode, LLMClient, LSPConnectionStatus, MCPConnectionStatus, Message } from '../types/index.js';
import type { CustomCommand } from '../types/commands.js';
import type { ThemePreset } from '../types/ui.js';
import type { UpdateInfo } from '../types/utils.js';
interface UseAppHandlersProps {
messages: Message[];
currentProvider: string;
currentModel: string;
currentTheme: ThemePreset;
abortController: AbortController | null;
updateInfo: UpdateInfo | null;
mcpServersStatus: MCPConnectionStatus[] | undefined;
lspServersStatus: LSPConnectionStatus[];
preferencesLoaded: boolean;
customCommandsCount: number;
getNextComponentKey: () => number;
customCommandCache: Map<string, CustomCommand>;
customCommandLoader: CustomCommandLoader | null;
customCommandExecutor: CustomCommandExecutor | null;
updateMessages: (newMessages: Message[]) => void;
setIsCancelling: (value: boolean) => void;
setDevelopmentMode: (updater: DevelopmentMode | ((prev: DevelopmentMode) => DevelopmentMode)) => void;
setIsConversationComplete: (value: boolean) => void;
setIsToolExecuting: (value: boolean) => void;
setIsCheckpointLoadMode: (value: boolean) => void;
setCheckpointLoadData: (value: {
checkpoints: CheckpointListItem[];
currentMessageCount: number;
} | null) => void;
addToChatQueue: (component: React.ReactNode) => void;
setLiveComponent: (component: React.ReactNode) => void;
client: LLMClient | null;
getMessageTokens: (message: Message) => number;
enterModelSelectionMode: () => void;
enterProviderSelectionMode: () => void;
enterModelDatabaseMode: () => void;
enterConfigWizardMode: () => void;
enterSettingsMode: () => void;
enterMcpWizardMode: () => void;
enterExplorerMode: () => void;
enterIdeSelectionMode: () => void;
enterSchedulerMode: () => void;
handleChatMessage: (message: string) => Promise<void>;
}
export interface AppHandlers {
clearMessages: () => Promise<void>;
handleCancel: () => void;
handleToggleDevelopmentMode: () => void;
handleShowStatus: () => void;
handleCheckpointSelect: (checkpointName: string, createBackup: boolean) => Promise<void>;
handleCheckpointCancel: () => void;
enterCheckpointLoadMode: (checkpoints: CheckpointListItem[], currentMessageCount: number) => void;
handleMessageSubmit: (message: string) => Promise<void>;
}
/**
* Consolidates all app handler setup into a single hook
*/
export declare function useAppHandlers(props: UseAppHandlersProps): AppHandlers;
export {};
//# sourceMappingURL=useAppHandlers.d.ts.map