Files
ccs/src/copilot/index.ts
T
kaitranntt 4783632958 fix(copilot): use token file check for instant auth status
- add hasTokenFile() for fast auth check without subprocess

- capture device code from copilot-api auth output

- export AuthFlowResult type with deviceCode and verificationUrl

- echo auth output to terminal while capturing for UI
2025-12-18 03:00:43 -05:00

49 lines
1.0 KiB
TypeScript

/**
* Copilot Module Index
*
* Central exports for GitHub Copilot integration via copilot-api.
*/
// Types
export * from './types';
// Package Manager (self-managed installation)
export {
getCopilotDir,
getCopilotApiBinPath,
isCopilotApiInstalled,
getInstalledVersion,
getPinnedVersion,
savePinnedVersion,
clearPinnedVersion,
checkForUpdates,
ensureCopilotApi,
installCopilotApiVersion,
uninstallCopilotApi,
getCopilotApiInfo,
} from './copilot-package-manager';
// Auth
export {
checkAuthStatus,
startAuthFlow,
getCopilotDebugInfo,
hasTokenFile,
getTokenPath,
} from './copilot-auth';
export type { AuthFlowResult } from './copilot-auth';
// Daemon
export { isDaemonRunning, getDaemonStatus, startDaemon, stopDaemon } from './copilot-daemon';
// Models
export {
DEFAULT_COPILOT_MODELS,
fetchModelsFromDaemon,
getAvailableModels,
getDefaultModel,
} from './copilot-models';
// Executor
export { getCopilotStatus, generateCopilotEnv, executeCopilotProfile } from './copilot-executor';