@zgsm/costrict-cli 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/package.json +2 -2
- package/dist/src/commands/extensions/disable.js +1 -1
- package/dist/src/commands/extensions/disable.test.js +1 -1
- package/dist/src/commands/extensions/enable.js +1 -1
- package/dist/src/commands/extensions/enable.test.js +2 -2
- package/dist/src/commands/extensions/install.js +1 -1
- package/dist/src/commands/extensions/install.test.js +1 -1
- package/dist/src/commands/extensions/link.js +1 -1
- package/dist/src/commands/extensions/link.test.js +1 -1
- package/dist/src/commands/extensions/list.js +1 -1
- package/dist/src/commands/extensions/list.test.js +1 -1
- package/dist/src/commands/extensions/new.js +1 -1
- package/dist/src/commands/extensions/settings.js +1 -1
- package/dist/src/commands/extensions/uninstall.js +1 -1
- package/dist/src/commands/extensions/uninstall.test.js +1 -1
- package/dist/src/commands/extensions/update.js +1 -1
- package/dist/src/commands/extensions/update.test.js +1 -1
- package/dist/src/commands/extensions/utils.d.ts +1 -1
- package/dist/src/commands/extensions/utils.js +1 -1
- package/dist/src/commands/extensions/validate.js +1 -1
- package/dist/src/commands/extensions/validate.test.js +1 -1
- package/dist/src/commands/hooks/migrate.js +1 -1
- package/dist/src/commands/hooks/migrate.test.js +1 -1
- package/dist/src/commands/mcp/add.js +1 -1
- package/dist/src/commands/mcp/add.test.js +1 -1
- package/dist/src/commands/mcp/list.js +1 -1
- package/dist/src/commands/mcp/list.test.js +2 -2
- package/dist/src/commands/mcp/remove.js +1 -1
- package/dist/src/commands/mcp/remove.test.js +1 -1
- package/dist/src/config/auth.js +1 -1
- package/dist/src/config/auth.test.js +1 -1
- package/dist/src/config/config.d.ts +1 -1
- package/dist/src/config/config.integration.test.js +3 -3
- package/dist/src/config/config.js +1 -1
- package/dist/src/config/config.test.js +4 -4
- package/dist/src/config/extension-manager.d.ts +1 -1
- package/dist/src/config/extension-manager.js +1 -1
- package/dist/src/config/extension.d.ts +1 -1
- package/dist/src/config/extension.test.js +2 -2
- package/dist/src/config/extensions/consent.js +1 -1
- package/dist/src/config/extensions/consent.test.js +2 -2
- package/dist/src/config/extensions/extensionEnablement.d.ts +1 -1
- package/dist/src/config/extensions/extensionEnablement.js +1 -1
- package/dist/src/config/extensions/extensionEnablement.test.js +1 -1
- package/dist/src/config/extensions/extensionSettings.js +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +2 -2
- package/dist/src/config/extensions/github.d.ts +1 -1
- package/dist/src/config/extensions/github.js +1 -1
- package/dist/src/config/extensions/github.test.js +1 -1
- package/dist/src/config/extensions/storage.js +1 -1
- package/dist/src/config/extensions/storage.test.js +2 -2
- package/dist/src/config/extensions/update.d.ts +1 -1
- package/dist/src/config/extensions/update.js +1 -1
- package/dist/src/config/extensions/variables.js +1 -1
- package/dist/src/config/policy-engine.integration.test.js +1 -1
- package/dist/src/config/policy.d.ts +1 -1
- package/dist/src/config/policy.js +1 -1
- package/dist/src/config/sandboxConfig.d.ts +1 -1
- package/dist/src/config/sandboxConfig.js +1 -1
- package/dist/src/config/sandboxConfig.test.js +2 -2
- package/dist/src/config/settings.js +1 -1
- package/dist/src/config/settings.test.js +2 -2
- package/dist/src/config/settingsSchema.d.ts +3 -3
- package/dist/src/config/settingsSchema.js +1 -1
- package/dist/src/config/settings_repro.test.js +1 -1
- package/dist/src/config/trustedFolders.js +1 -1
- package/dist/src/config/trustedFolders.test.js +1 -1
- package/dist/src/core/auth.d.ts +1 -1
- package/dist/src/core/auth.js +1 -1
- package/dist/src/core/auth.test.js +2 -2
- package/dist/src/core/initializer.d.ts +1 -1
- package/dist/src/core/initializer.js +1 -1
- package/dist/src/core/initializer.test.js +2 -2
- package/dist/src/gemini.d.ts +1 -1
- package/dist/src/gemini.js +1 -1
- package/dist/src/gemini.test.js +7 -7
- package/dist/src/gemini_cleanup.test.js +3 -3
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +1 -1
- package/dist/src/nonInteractiveCli.js +1 -1
- package/dist/src/nonInteractiveCli.test.js +3 -3
- package/dist/src/nonInteractiveCliCommands.d.ts +1 -1
- package/dist/src/nonInteractiveCliCommands.js +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +1 -1
- package/dist/src/services/CommandService.js +1 -1
- package/dist/src/services/CommandService.test.js +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +1 -1
- package/dist/src/services/FileCommandLoader.js +1 -1
- package/dist/src/services/FileCommandLoader.test.js +2 -2
- package/dist/src/services/McpPromptLoader.d.ts +1 -1
- package/dist/src/services/McpPromptLoader.js +1 -1
- package/dist/src/services/McpPromptLoader.test.js +1 -1
- package/dist/src/services/prompt-processors/argumentProcessor.js +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.js +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.js +2 -2
- package/dist/src/test-utils/createExtension.d.ts +1 -1
- package/dist/src/test-utils/createExtension.js +1 -1
- package/dist/src/test-utils/render.d.ts +1 -1
- package/dist/src/test-utils/render.js +1 -1
- package/dist/src/ui/App.test.js +1 -1
- package/dist/src/ui/AppContainer.d.ts +1 -1
- package/dist/src/ui/AppContainer.js +1 -1
- package/dist/src/ui/AppContainer.test.js +3 -3
- package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.js +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.js +2 -2
- package/dist/src/ui/auth/AuthDialog.d.ts +1 -1
- package/dist/src/ui/auth/AuthDialog.js +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +2 -2
- package/dist/src/ui/auth/useAuth.d.ts +1 -1
- package/dist/src/ui/auth/useAuth.js +2 -2
- package/dist/src/ui/auth/useAuth.test.js +2 -2
- package/dist/src/ui/commands/aboutCommand.js +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +2 -2
- package/dist/src/ui/commands/bugCommand.js +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +2 -2
- package/dist/src/ui/commands/chatCommand.js +1 -1
- package/dist/src/ui/commands/chatCommand.test.js +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +3 -3
- package/dist/src/ui/commands/compressCommand.test.js +1 -1
- package/dist/src/ui/commands/copyCommand.js +1 -1
- package/dist/src/ui/commands/directoryCommand.js +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +1 -1
- package/dist/src/ui/commands/hooksCommand.js +1 -1
- package/dist/src/ui/commands/hooksCommand.test.js +1 -1
- package/dist/src/ui/commands/ideCommand.js +2 -2
- package/dist/src/ui/commands/ideCommand.test.js +3 -3
- package/dist/src/ui/commands/initCommand.js +1 -1
- package/dist/src/ui/commands/mcpCommand.js +2 -2
- package/dist/src/ui/commands/mcpCommand.test.js +2 -2
- package/dist/src/ui/commands/memoryCommand.js +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +2 -2
- package/dist/src/ui/commands/policiesCommand.test.js +1 -1
- package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
- package/dist/src/ui/commands/restoreCommand.js +1 -1
- package/dist/src/ui/commands/restoreCommand.test.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js +1 -1
- package/dist/src/ui/commands/statsCommand.js +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +1 -1
- package/dist/src/ui/commands/types.d.ts +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +1 -1
- package/dist/src/ui/components/AnsiOutput.d.ts +1 -1
- package/dist/src/ui/components/AppHeader.test.js +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.js +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.test.js +1 -1
- package/dist/src/ui/components/Composer.js +1 -1
- package/dist/src/ui/components/Composer.test.js +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.js +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.test.js +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.js +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.test.js +1 -1
- package/dist/src/ui/components/DebugProfiler.js +1 -1
- package/dist/src/ui/components/DialogManager.test.js +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +1 -1
- package/dist/src/ui/components/Footer.js +1 -1
- package/dist/src/ui/components/Footer.test.js +2 -2
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +2 -2
- package/dist/src/ui/components/InputPrompt.js +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +1 -1
- package/dist/src/ui/components/LoadingIndicator.d.ts +1 -1
- package/dist/src/ui/components/ModelDialog.js +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +1 -1
- package/dist/src/ui/components/Notifications.js +1 -1
- package/dist/src/ui/components/Notifications.test.js +1 -1
- package/dist/src/ui/components/ProQuotaDialog.d.ts +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +1 -1
- package/dist/src/ui/components/SessionBrowser.d.ts +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellInputPrompt.js +1 -1
- package/dist/src/ui/components/ShellInputPrompt.test.js +3 -3
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.js +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +1 -1
- package/dist/src/ui/components/Tips.d.ts +1 -1
- package/dist/src/ui/components/Tips.js +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.js +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.js +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +1 -1
- package/dist/src/ui/components/messages/Todo.js +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolShared.js +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +1 -1
- package/dist/src/ui/components/views/ExtensionsList.d.ts +1 -1
- package/dist/src/ui/components/views/ExtensionsList.js +1 -1
- package/dist/src/ui/components/views/McpStatus.d.ts +2 -2
- package/dist/src/ui/components/views/McpStatus.js +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +2 -2
- package/dist/src/ui/contexts/ConfigContext.d.ts +1 -1
- package/dist/src/ui/contexts/ConfigContext.js +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +1 -1
- package/dist/src/ui/contexts/MouseContext.js +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +1 -1
- package/dist/src/ui/contexts/SessionContext.js +1 -1
- package/dist/src/ui/contexts/SessionContext.test.js +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +1 -1
- package/dist/src/ui/contexts/UIActionsContext.js +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +1 -1
- package/dist/src/ui/editors/editorSettingsManager.d.ts +1 -1
- package/dist/src/ui/editors/editorSettingsManager.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +2 -2
- package/dist/src/ui/hooks/slashCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/useAtCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +1 -1
- package/dist/src/ui/hooks/useAtCompletion.test.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +3 -3
- package/dist/src/ui/hooks/useBanner.d.ts +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.js +2 -2
- package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js +3 -3
- package/dist/src/ui/hooks/useExtensionUpdates.js +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +1 -1
- package/dist/src/ui/hooks/useFlickerDetector.js +1 -1
- package/dist/src/ui/hooks/useFlickerDetector.test.js +3 -3
- package/dist/src/ui/hooks/useFolderTrust.js +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
- package/dist/src/ui/hooks/useGeminiStream.js +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +2 -2
- package/dist/src/ui/hooks/useGitBranchName.js +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +4 -4
- package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.js +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +2 -2
- package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +1 -1
- package/dist/src/ui/hooks/useInputHistoryStore.js +1 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +1 -1
- package/dist/src/ui/hooks/useLogger.d.ts +2 -2
- package/dist/src/ui/hooks/useLogger.js +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +2 -2
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +2 -2
- package/dist/src/ui/hooks/useSessionBrowser.d.ts +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.js +1 -1
- package/dist/src/ui/hooks/useSessionResume.d.ts +1 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +1 -1
- package/dist/src/ui/hooks/useShellHistory.js +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.js +2 -2
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +4 -4
- package/dist/src/ui/hooks/vim.js +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.js +1 -1
- package/dist/src/ui/themes/color-utils.js +1 -1
- package/dist/src/ui/themes/theme-manager.js +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +1 -1
- package/dist/src/ui/types.d.ts +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +1 -1
- package/dist/src/ui/utils/bracketedPaste.js +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +1 -1
- package/dist/src/ui/utils/commandUtils.js +1 -1
- package/dist/src/ui/utils/directoryUtils.test.js +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.js +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.test.js +1 -1
- package/dist/src/ui/utils/mouse.d.ts +1 -1
- package/dist/src/ui/utils/mouse.js +1 -1
- package/dist/src/ui/utils/terminalSetup.js +1 -1
- package/dist/src/ui/utils/updateCheck.js +1 -1
- package/dist/src/ui/utils/updateCheck.test.js +1 -1
- package/dist/src/utils/cleanup.d.ts +1 -1
- package/dist/src/utils/cleanup.js +1 -1
- package/dist/src/utils/cleanup.test.js +1 -1
- package/dist/src/utils/commentJson.js +1 -1
- package/dist/src/utils/commentJson.test.js +2 -2
- package/dist/src/utils/errors.d.ts +1 -1
- package/dist/src/utils/errors.js +1 -1
- package/dist/src/utils/errors.test.js +2 -2
- package/dist/src/utils/events.d.ts +1 -1
- package/dist/src/utils/gitUtils.js +1 -1
- package/dist/src/utils/installationInfo.js +1 -1
- package/dist/src/utils/installationInfo.test.js +2 -2
- package/dist/src/utils/persistentState.js +1 -1
- package/dist/src/utils/persistentState.test.js +2 -2
- package/dist/src/utils/readStdin.js +1 -1
- package/dist/src/utils/readStdin.test.js +2 -2
- package/dist/src/utils/sandbox.d.ts +1 -1
- package/dist/src/utils/sandbox.js +1 -1
- package/dist/src/utils/sandbox.test.js +2 -2
- package/dist/src/utils/sandboxUtils.js +1 -1
- package/dist/src/utils/sandboxUtils.test.js +1 -1
- package/dist/src/utils/sessionCleanup.d.ts +1 -1
- package/dist/src/utils/sessionCleanup.integration.test.js +1 -1
- package/dist/src/utils/sessionCleanup.js +1 -1
- package/dist/src/utils/sessionCleanup.test.js +1 -1
- package/dist/src/utils/sessionUtils.d.ts +1 -1
- package/dist/src/utils/sessionUtils.js +1 -1
- package/dist/src/utils/sessionUtils.test.js +1 -1
- package/dist/src/utils/sessions.d.ts +1 -1
- package/dist/src/utils/sessions.js +1 -1
- package/dist/src/utils/sessions.test.js +3 -3
- package/dist/src/utils/startupWarnings.js +1 -1
- package/dist/src/utils/startupWarnings.test.js +2 -2
- package/dist/src/validateNonInterActiveAuth.d.ts +2 -2
- package/dist/src/validateNonInterActiveAuth.js +1 -1
- package/dist/src/validateNonInterActiveAuth.test.js +1 -1
- package/dist/src/zed-integration/connection.js +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -1
- package/dist/src/zed-integration/schema.d.ts +940 -940
- package/dist/src/zed-integration/zedIntegration.d.ts +1 -1
- package/dist/src/zed-integration/zedIntegration.js +1 -1
- package/dist/src/zed-integration/zedIntegration.test.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ import { AtFileProcessor } from './atFileProcessor.js';
|
|
|
10
10
|
import { MessageType } from '../../ui/types.js';
|
|
11
11
|
// Mock the core dependency
|
|
12
12
|
const mockReadPathFromWorkspace = vi.hoisted(() => vi.fn());
|
|
13
|
-
vi.mock('@
|
|
13
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
14
14
|
const original = await importOriginal();
|
|
15
15
|
return {
|
|
16
16
|
...original,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { ApprovalMode, checkCommandPermissions, escapeShellArg, getShellConfiguration, ShellExecutionService, flatMapTextParts, } from '@
|
|
6
|
+
import { ApprovalMode, checkCommandPermissions, escapeShellArg, getShellConfiguration, ShellExecutionService, flatMapTextParts, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { SHELL_INJECTION_TRIGGER, SHORTHAND_ARGS_PLACEHOLDER, } from './types.js';
|
|
8
8
|
import { extractInjections } from './injectionParser.js';
|
|
9
9
|
import { themeManager } from '../../ui/themes/theme-manager.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
7
7
|
import { ConfirmationRequiredError, ShellProcessor } from './shellProcessor.js';
|
|
8
8
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
9
|
-
import { ApprovalMode, getShellConfiguration } from '@
|
|
9
|
+
import { ApprovalMode, getShellConfiguration } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { quote } from 'shell-quote';
|
|
11
11
|
import { createPartFromText } from '@google/genai';
|
|
12
12
|
// Helper function to determine the expected escaped string based on the current OS,
|
|
@@ -29,7 +29,7 @@ function createPromptPipelineContent(text) {
|
|
|
29
29
|
}
|
|
30
30
|
const mockCheckCommandPermissions = vi.hoisted(() => vi.fn());
|
|
31
31
|
const mockShellExecute = vi.hoisted(() => vi.fn());
|
|
32
|
-
vi.mock('@
|
|
32
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
33
33
|
const original = await importOriginal();
|
|
34
34
|
return {
|
|
35
35
|
...original,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type MCPServerConfig, type ExtensionInstallMetadata } from '@
|
|
6
|
+
import { type MCPServerConfig, type ExtensionInstallMetadata } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { ExtensionSetting } from '../config/extensions/extensionSettings.js';
|
|
8
8
|
export declare function createExtension({ extensionsDir, name, version, addContextFile, contextFileName, mcpServers, installMetadata, settings, }?: {
|
|
9
9
|
extensionsDir?: string | undefined;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from 'node:fs';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
|
-
import {} from '@
|
|
8
|
+
import {} from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { EXTENSIONS_CONFIG_FILENAME, INSTALL_METADATA_FILENAME, } from '../config/extensions/variables.js';
|
|
10
10
|
export function createExtension({ extensionsDir = 'extensions-dir', name = 'my-extension', version = '1.0.0', addContextFile = false, contextFileName = undefined, mcpServers = {}, installMetadata = undefined, settings = undefined, } = {}) {
|
|
11
11
|
const extDir = path.join(extensionsDir, name);
|
|
@@ -8,7 +8,7 @@ import type React from 'react';
|
|
|
8
8
|
import { LoadedSettings, type Settings } from '../config/settings.js';
|
|
9
9
|
import { type UIState } from '../ui/contexts/UIStateContext.js';
|
|
10
10
|
import { type UIActions } from '../ui/contexts/UIActionsContext.js';
|
|
11
|
-
import { type Config } from '@
|
|
11
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
12
12
|
export declare const render: (tree: React.ReactElement, terminalWidth?: number) => ReturnType<typeof inkRender>;
|
|
13
13
|
export declare const simulateClick: (stdin: ReturnType<typeof inkRender>["stdin"], col: number, row: number, button?: 0 | 1 | 2) => Promise<void>;
|
|
14
14
|
export declare const mockSettings: LoadedSettings;
|
|
@@ -21,7 +21,7 @@ import { MouseProvider } from '../ui/contexts/MouseContext.js';
|
|
|
21
21
|
import { ScrollProvider } from '../ui/contexts/ScrollProvider.js';
|
|
22
22
|
import { StreamingContext } from '../ui/contexts/StreamingContext.js';
|
|
23
23
|
import { UIActionsContext, } from '../ui/contexts/UIActionsContext.js';
|
|
24
|
-
import {} from '@
|
|
24
|
+
import {} from '@zgsm/costrict-cli-core';
|
|
25
25
|
// Wrapper around ink-testing-library's render that ensures act() is called
|
|
26
26
|
export const render = (tree, terminalWidth) => {
|
|
27
27
|
let renderResult = undefined;
|
package/dist/src/ui/App.test.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { describe, it, expect, vi } from 'vitest';
|
|
8
8
|
import { render } from '../test-utils/render.js';
|
|
9
9
|
import { Text, useIsScreenReaderEnabled } from 'ink';
|
|
10
|
-
import { makeFakeConfig } from '@
|
|
10
|
+
import { makeFakeConfig } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { App } from './App.js';
|
|
12
12
|
import { UIStateContext } from './contexts/UIStateContext.js';
|
|
13
13
|
import { StreamingState } from './types.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type Config, type ResumedSessionData } from '@
|
|
6
|
+
import { type Config, type ResumedSessionData } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { type InitializationResult } from '../core/initializer.js';
|
|
8
8
|
interface AppContainerProps {
|
|
9
9
|
config: Config;
|
|
@@ -13,7 +13,7 @@ import { UIActionsContext, } from './contexts/UIActionsContext.js';
|
|
|
13
13
|
import { ConfigContext } from './contexts/ConfigContext.js';
|
|
14
14
|
import { ToolCallStatus, AuthState, } from './types.js';
|
|
15
15
|
import { MessageType, StreamingState } from './types.js';
|
|
16
|
-
import { DEFAULT_GEMINI_FLASH_MODEL, IdeClient, ideContextStore, getErrorMessage, getAllGeminiMdFilenames, AuthType, clearCachedCredentialFile, recordExitFail, ShellExecutionService, saveApiKey, debugLogger, coreEvents, CoreEvent, refreshServerHierarchicalMemory, writeToStdout, disableMouseEvents, enterAlternateScreen, enableMouseEvents, disableLineWrapping, shouldEnterAlternateScreen, startupProfiler, SessionStartSource, SessionEndReason, fireSessionStartHook, fireSessionEndHook, generateSummary, } from '@
|
|
16
|
+
import { DEFAULT_GEMINI_FLASH_MODEL, IdeClient, ideContextStore, getErrorMessage, getAllGeminiMdFilenames, AuthType, clearCachedCredentialFile, recordExitFail, ShellExecutionService, saveApiKey, debugLogger, coreEvents, CoreEvent, refreshServerHierarchicalMemory, writeToStdout, disableMouseEvents, enterAlternateScreen, enableMouseEvents, disableLineWrapping, shouldEnterAlternateScreen, startupProfiler, SessionStartSource, SessionEndReason, fireSessionStartHook, fireSessionEndHook, generateSummary, } from '@zgsm/costrict-cli-core';
|
|
17
17
|
import { validateAuthMethod } from '../config/auth.js';
|
|
18
18
|
import process from 'node:process';
|
|
19
19
|
import { useHistory } from './hooks/useHistoryManager.js';
|
|
@@ -11,7 +11,7 @@ import { cleanup } from 'ink-testing-library';
|
|
|
11
11
|
import { act, useContext } from 'react';
|
|
12
12
|
import { AppContainer } from './AppContainer.js';
|
|
13
13
|
import { SettingsContext } from './contexts/SettingsContext.js';
|
|
14
|
-
import { makeFakeConfig, CoreEvent, AuthType, } from '@
|
|
14
|
+
import { makeFakeConfig, CoreEvent, AuthType, } from '@zgsm/costrict-cli-core';
|
|
15
15
|
// Mock coreEvents
|
|
16
16
|
const mockCoreEvents = vi.hoisted(() => ({
|
|
17
17
|
on: vi.fn(),
|
|
@@ -27,7 +27,7 @@ const mockIdeClient = vi.hoisted(() => ({
|
|
|
27
27
|
const mocks = vi.hoisted(() => ({
|
|
28
28
|
mockStdout: { write: vi.fn() },
|
|
29
29
|
}));
|
|
30
|
-
vi.mock('@
|
|
30
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
31
31
|
const actual = await importOriginal();
|
|
32
32
|
return {
|
|
33
33
|
...actual,
|
|
@@ -126,7 +126,7 @@ import { useInputHistoryStore } from './hooks/useInputHistoryStore.js';
|
|
|
126
126
|
import { useKeypress } from './hooks/useKeypress.js';
|
|
127
127
|
import { measureElement } from 'ink';
|
|
128
128
|
import { useTerminalSize } from './hooks/useTerminalSize.js';
|
|
129
|
-
import { ShellExecutionService, writeToStdout, enableMouseEvents, disableMouseEvents, } from '@
|
|
129
|
+
import { ShellExecutionService, writeToStdout, enableMouseEvents, disableMouseEvents, } from '@zgsm/costrict-cli-core';
|
|
130
130
|
import {} from '../config/extension-manager.js';
|
|
131
131
|
describe('AppContainer State Management', () => {
|
|
132
132
|
let mockConfig;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { IdeInfo } from '@
|
|
6
|
+
import type { IdeInfo } from '@zgsm/costrict-cli-core';
|
|
7
7
|
export type IdeIntegrationNudgeResult = {
|
|
8
8
|
userSelection: 'yes' | 'no' | 'dismiss';
|
|
9
9
|
isExtensionPreInstalled: boolean;
|
|
@@ -5,7 +5,7 @@ import { theme } from '../semantic-colors.js';
|
|
|
5
5
|
import { TextInput } from '../components/shared/TextInput.js';
|
|
6
6
|
import { useTextBuffer } from '../components/shared/text-buffer.js';
|
|
7
7
|
import { useUIState } from '../contexts/UIStateContext.js';
|
|
8
|
-
import { clearApiKey, debugLogger } from '@
|
|
8
|
+
import { clearApiKey, debugLogger } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
10
10
|
import { keyMatchers, Command } from '../keyMatchers.js';
|
|
11
11
|
export function ApiAuthDialog({ onSubmit, onCancel, error, defaultValue = '', }) {
|
|
@@ -9,9 +9,9 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
|
9
9
|
import { ApiAuthDialog } from './ApiAuthDialog.js';
|
|
10
10
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
11
11
|
import { useTextBuffer, } from '../components/shared/text-buffer.js';
|
|
12
|
-
import { clearApiKey } from '@
|
|
12
|
+
import { clearApiKey } from '@zgsm/costrict-cli-core';
|
|
13
13
|
// Mocks
|
|
14
|
-
vi.mock('@
|
|
14
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
15
15
|
const actual = await importOriginal();
|
|
16
16
|
return {
|
|
17
17
|
...actual,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type React from 'react';
|
|
7
7
|
import type { LoadedSettings } from '../../config/settings.js';
|
|
8
|
-
import { type Config } from '@
|
|
8
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { AuthState } from '../types.js';
|
|
10
10
|
interface AuthDialogProps {
|
|
11
11
|
config: Config;
|
|
@@ -4,7 +4,7 @@ import { Box, Text } from 'ink';
|
|
|
4
4
|
import { theme } from '../semantic-colors.js';
|
|
5
5
|
import { RadioButtonSelect } from '../components/shared/RadioButtonSelect.js';
|
|
6
6
|
import { SettingScope } from '../../config/settings.js';
|
|
7
|
-
import { AuthType, clearCachedCredentialFile, } from '@
|
|
7
|
+
import { AuthType, clearCachedCredentialFile, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
9
9
|
import { AuthState } from '../types.js';
|
|
10
10
|
import { runExitCleanup } from '../../utils/cleanup.js';
|
|
@@ -7,7 +7,7 @@ import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-run
|
|
|
7
7
|
import { renderWithProviders } from '../../test-utils/render.js';
|
|
8
8
|
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
9
9
|
import { AuthDialog } from './AuthDialog.js';
|
|
10
|
-
import { AuthType, debugLogger } from '@
|
|
10
|
+
import { AuthType, debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { AuthState } from '../types.js';
|
|
12
12
|
import { RadioButtonSelect } from '../components/shared/RadioButtonSelect.js';
|
|
13
13
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
@@ -16,7 +16,7 @@ import { runExitCleanup } from '../../utils/cleanup.js';
|
|
|
16
16
|
import { Text } from 'ink';
|
|
17
17
|
import { RELAUNCH_EXIT_CODE } from '../../utils/processUtils.js';
|
|
18
18
|
// Mocks
|
|
19
|
-
vi.mock('@
|
|
19
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
20
20
|
const actual = await importOriginal();
|
|
21
21
|
return {
|
|
22
22
|
...actual,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { LoadedSettings } from '../../config/settings.js';
|
|
7
|
-
import { AuthType, type Config } from '@
|
|
7
|
+
import { AuthType, type Config } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { AuthState } from '../types.js';
|
|
9
9
|
export declare function validateAuthMethodWithSettings(authType: AuthType, settings: LoadedSettings): string | null;
|
|
10
10
|
export declare const useAuthCommand: (settings: LoadedSettings, config: Config) => {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect, useCallback } from 'react';
|
|
7
|
-
import { AuthType, loadApiKey, debugLogger, } from '@
|
|
8
|
-
import { getErrorMessage } from '@
|
|
7
|
+
import { AuthType, loadApiKey, debugLogger, } from '@zgsm/costrict-cli-core';
|
|
8
|
+
import { getErrorMessage } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { AuthState } from '../types.js';
|
|
10
10
|
import { validateAuthMethod } from '../../config/auth.js';
|
|
11
11
|
export function validateAuthMethodWithSettings(authType, settings) {
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
7
7
|
import { renderHook } from '../../test-utils/render.js';
|
|
8
8
|
import { useAuthCommand, validateAuthMethodWithSettings } from './useAuth.js';
|
|
9
|
-
import { AuthType } from '@
|
|
9
|
+
import { AuthType } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { AuthState } from '../types.js';
|
|
11
11
|
import { waitFor } from '../../test-utils/async.js';
|
|
12
12
|
// Mock dependencies
|
|
13
13
|
const mockLoadApiKey = vi.fn();
|
|
14
14
|
const mockValidateAuthMethod = vi.fn();
|
|
15
|
-
vi.mock('@
|
|
15
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
16
16
|
const actual = await importOriginal();
|
|
17
17
|
return {
|
|
18
18
|
...actual,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { CommandKind } from './types.js';
|
|
7
7
|
import process from 'node:process';
|
|
8
8
|
import { MessageType } from '../types.js';
|
|
9
|
-
import { IdeClient, UserAccountManager, debugLogger, getVersion, } from '@
|
|
9
|
+
import { IdeClient, UserAccountManager, debugLogger, getVersion, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
export const aboutCommand = {
|
|
11
11
|
name: 'about',
|
|
12
12
|
description: 'Show version info',
|
|
@@ -8,8 +8,8 @@ import { aboutCommand } from './aboutCommand.js';
|
|
|
8
8
|
import {} from './types.js';
|
|
9
9
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
10
10
|
import { MessageType } from '../types.js';
|
|
11
|
-
import { IdeClient, getVersion } from '@
|
|
12
|
-
vi.mock('@
|
|
11
|
+
import { IdeClient, getVersion } from '@zgsm/costrict-cli-core';
|
|
12
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
13
13
|
const actual = await importOriginal();
|
|
14
14
|
return {
|
|
15
15
|
...actual,
|
|
@@ -9,7 +9,7 @@ import { CommandKind, } from './types.js';
|
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
10
10
|
import { GIT_COMMIT_INFO } from '../../generated/git-commit.js';
|
|
11
11
|
import { formatMemoryUsage } from '../utils/formatters.js';
|
|
12
|
-
import { IdeClient, sessionId, getVersion } from '@
|
|
12
|
+
import { IdeClient, sessionId, getVersion } from '@zgsm/costrict-cli-core';
|
|
13
13
|
export const bugCommand = {
|
|
14
14
|
name: 'bug',
|
|
15
15
|
description: 'Submit a bug report',
|
|
@@ -7,13 +7,13 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
|
7
7
|
import open from 'open';
|
|
8
8
|
import { bugCommand } from './bugCommand.js';
|
|
9
9
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
10
|
-
import { getVersion } from '@
|
|
10
|
+
import { getVersion } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { GIT_COMMIT_INFO } from '../../generated/git-commit.js';
|
|
12
12
|
import { formatMemoryUsage } from '../utils/formatters.js';
|
|
13
13
|
// Mock dependencies
|
|
14
14
|
vi.mock('open');
|
|
15
15
|
vi.mock('../utils/formatters.js');
|
|
16
|
-
vi.mock('@
|
|
16
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
17
17
|
const actual = await importOriginal();
|
|
18
18
|
return {
|
|
19
19
|
...actual,
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { Text } from 'ink';
|
|
9
9
|
import { theme } from '../semantic-colors.js';
|
|
10
10
|
import { CommandKind } from './types.js';
|
|
11
|
-
import { decodeTagName, } from '@
|
|
11
|
+
import { decodeTagName, } from '@zgsm/costrict-cli-core';
|
|
12
12
|
import path from 'node:path';
|
|
13
13
|
import { MessageType } from '../types.js';
|
|
14
14
|
const getSavedChatTags = async (context, mtSortDesc) => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
7
7
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
8
|
-
import { AuthType } from '@
|
|
8
|
+
import { AuthType } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import * as fsPromises from 'node:fs/promises';
|
|
10
10
|
import { chatCommand, serializeHistoryToMarkdown } from './chatCommand.js';
|
|
11
11
|
import path from 'node:path';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { uiTelemetryService, fireSessionEndHook, fireSessionStartHook, SessionEndReason, SessionStartSource, flushTelemetry, } from '@
|
|
6
|
+
import { uiTelemetryService, fireSessionEndHook, fireSessionStartHook, SessionEndReason, SessionStartSource, flushTelemetry, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { CommandKind } from './types.js';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
export const clearCommand = {
|
|
@@ -8,8 +8,8 @@ import { clearCommand } from './clearCommand.js';
|
|
|
8
8
|
import {} from './types.js';
|
|
9
9
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
10
10
|
// Mock the telemetry service
|
|
11
|
-
vi.mock('@
|
|
12
|
-
const actual = await vi.importActual('@
|
|
11
|
+
vi.mock('@zgsm/costrict-cli-core', async () => {
|
|
12
|
+
const actual = await vi.importActual('@zgsm/costrict-cli-core');
|
|
13
13
|
return {
|
|
14
14
|
...actual,
|
|
15
15
|
uiTelemetryService: {
|
|
@@ -17,7 +17,7 @@ vi.mock('@google/gemini-cli-core', async () => {
|
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
|
-
import { uiTelemetryService } from '@
|
|
20
|
+
import { uiTelemetryService } from '@zgsm/costrict-cli-core';
|
|
21
21
|
describe('clearCommand', () => {
|
|
22
22
|
let mockContext;
|
|
23
23
|
let mockResetChat;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CompressionStatus, } from '@
|
|
6
|
+
import { CompressionStatus, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
8
8
|
import { compressCommand } from './compressCommand.js';
|
|
9
9
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger } from '@
|
|
6
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { copyToClipboard } from '../utils/commandUtils.js';
|
|
8
8
|
import { CommandKind } from './types.js';
|
|
9
9
|
export const copyCommand = {
|
|
@@ -8,7 +8,7 @@ import { isFolderTrustEnabled, isWorkspaceTrusted, loadTrustedFolders, } from '.
|
|
|
8
8
|
import { MultiFolderTrustDialog } from '../components/MultiFolderTrustDialog.js';
|
|
9
9
|
import { CommandKind } from './types.js';
|
|
10
10
|
import { MessageType } from '../types.js';
|
|
11
|
-
import { refreshServerHierarchicalMemory } from '@
|
|
11
|
+
import { refreshServerHierarchicalMemory } from '@zgsm/costrict-cli-core';
|
|
12
12
|
import { expandHomeDir } from '../utils/directoryUtils.js';
|
|
13
13
|
async function finishAddingDirectories(config, addItem, added, errors) {
|
|
14
14
|
if (!config) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger, listExtensions } from '@
|
|
6
|
+
import { debugLogger, listExtensions } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
8
8
|
import { emptyIcon, MessageType, } from '../types.js';
|
|
9
9
|
import { CommandKind, } from './types.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { CommandKind } from './types.js';
|
|
7
7
|
import { MessageType } from '../types.js';
|
|
8
|
-
import { getErrorMessage } from '@
|
|
8
|
+
import { getErrorMessage } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { SettingScope } from '../../config/settings.js';
|
|
10
10
|
/**
|
|
11
11
|
* Display a formatted list of hooks with their status
|
|
@@ -7,7 +7,7 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
|
7
7
|
import { hooksCommand } from './hooksCommand.js';
|
|
8
8
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
10
|
-
import { HookType, HookEventName, ConfigSource } from '@
|
|
10
|
+
import { HookType, HookEventName, ConfigSource } from '@zgsm/costrict-cli-core';
|
|
11
11
|
describe('hooksCommand', () => {
|
|
12
12
|
let mockContext;
|
|
13
13
|
let mockHookSystem;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IdeClient, logIdeConnection, IdeConnectionEvent, IdeConnectionType, } from '@
|
|
7
|
-
import { getIdeInstaller, IDEConnectionStatus, ideContextStore, GEMINI_CLI_COMPANION_EXTENSION_NAME, } from '@
|
|
6
|
+
import { IdeClient, logIdeConnection, IdeConnectionEvent, IdeConnectionType, } from '@zgsm/costrict-cli-core';
|
|
7
|
+
import { getIdeInstaller, IDEConnectionStatus, ideContextStore, GEMINI_CLI_COMPANION_EXTENSION_NAME, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import { CommandKind } from './types.js';
|
|
10
10
|
import { SettingScope } from '../../config/settings.js';
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
7
7
|
import { ideCommand } from './ideCommand.js';
|
|
8
8
|
import {} from './types.js';
|
|
9
|
-
import { IDE_DEFINITIONS } from '@
|
|
10
|
-
import * as core from '@
|
|
11
|
-
vi.mock('@
|
|
9
|
+
import { IDE_DEFINITIONS } from '@zgsm/costrict-cli-core';
|
|
10
|
+
import * as core from '@zgsm/costrict-cli-core';
|
|
11
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
12
12
|
const original = await importOriginal();
|
|
13
13
|
return {
|
|
14
14
|
...original,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import * as fs from 'node:fs';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
8
|
import { CommandKind } from './types.js';
|
|
9
|
-
import { performInit } from '@
|
|
9
|
+
import { performInit } from '@zgsm/costrict-cli-core';
|
|
10
10
|
export const initCommand = {
|
|
11
11
|
name: 'init',
|
|
12
12
|
description: 'Analyzes the project and creates a tailored COSTRICT.md file',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { CommandKind } from './types.js';
|
|
7
|
-
import { DiscoveredMCPTool, getMCPDiscoveryState, getMCPServerStatus, MCPDiscoveryState, MCPServerStatus, getErrorMessage, MCPOAuthTokenStorage, mcpServerRequiresOAuth, } from '@
|
|
7
|
+
import { DiscoveredMCPTool, getMCPDiscoveryState, getMCPServerStatus, MCPDiscoveryState, MCPServerStatus, getErrorMessage, MCPOAuthTokenStorage, mcpServerRequiresOAuth, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { appEvents, AppEvent } from '../../utils/events.js';
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
10
10
|
const authCommand = {
|
|
@@ -68,7 +68,7 @@ const authCommand = {
|
|
|
68
68
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`,
|
|
69
69
|
}, Date.now());
|
|
70
70
|
// Import dynamically to avoid circular dependencies
|
|
71
|
-
const { MCPOAuthProvider } = await import('@
|
|
71
|
+
const { MCPOAuthProvider } = await import('@zgsm/costrict-cli-core');
|
|
72
72
|
let oauthConfig = server.oauth;
|
|
73
73
|
if (!oauthConfig) {
|
|
74
74
|
oauthConfig = { enabled: false };
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
7
7
|
import { mcpCommand } from './mcpCommand.js';
|
|
8
8
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
9
|
-
import { MCPServerStatus, MCPDiscoveryState, getMCPServerStatus, getMCPDiscoveryState, DiscoveredMCPTool, } from '@
|
|
9
|
+
import { MCPServerStatus, MCPDiscoveryState, getMCPServerStatus, getMCPDiscoveryState, DiscoveredMCPTool, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { Type } from '@google/genai';
|
|
11
11
|
import { MessageType } from '../types.js';
|
|
12
|
-
vi.mock('@
|
|
12
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
13
13
|
const actual = await importOriginal();
|
|
14
14
|
const mockAuthenticate = vi.fn();
|
|
15
15
|
return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getErrorMessage, refreshServerHierarchicalMemory, } from '@
|
|
6
|
+
import { getErrorMessage, refreshServerHierarchicalMemory, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { MessageType } from '../types.js';
|
|
8
8
|
import { CommandKind } from './types.js';
|
|
9
9
|
export const memoryCommand = {
|
|
@@ -7,8 +7,8 @@ import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
|
7
7
|
import { memoryCommand } from './memoryCommand.js';
|
|
8
8
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
10
|
-
import { getErrorMessage, refreshServerHierarchicalMemory, SimpleExtensionLoader, } from '@
|
|
11
|
-
vi.mock('@
|
|
10
|
+
import { getErrorMessage, refreshServerHierarchicalMemory, SimpleExtensionLoader, } from '@zgsm/costrict-cli-core';
|
|
11
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
12
12
|
const original = await importOriginal();
|
|
13
13
|
return {
|
|
14
14
|
...original,
|
|
@@ -8,7 +8,7 @@ import { policiesCommand } from './policiesCommand.js';
|
|
|
8
8
|
import { CommandKind } from './types.js';
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
10
10
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
11
|
-
import { PolicyDecision } from '@
|
|
11
|
+
import { PolicyDecision } from '@zgsm/costrict-cli-core';
|
|
12
12
|
describe('policiesCommand', () => {
|
|
13
13
|
let mockContext;
|
|
14
14
|
beforeEach(() => {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type Config } from '@
|
|
6
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { type SlashCommand } from './types.js';
|
|
8
8
|
export declare const restoreCommand: (config: Config | null) => SlashCommand | null;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import * as fs from 'node:fs/promises';
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { formatCheckpointDisplayList, getToolCallDataSchema, getTruncatedCheckpointNames, performRestore, } from '@
|
|
9
|
+
import { formatCheckpointDisplayList, getToolCallDataSchema, getTruncatedCheckpointNames, performRestore, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { CommandKind, } from './types.js';
|
|
11
11
|
const HistoryItemSchema = z
|
|
12
12
|
.object({
|
|
@@ -10,7 +10,7 @@ import * as path from 'node:path';
|
|
|
10
10
|
import { restoreCommand } from './restoreCommand.js';
|
|
11
11
|
import {} from './types.js';
|
|
12
12
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
13
|
-
import { GEMINI_DIR, } from '@
|
|
13
|
+
import { GEMINI_DIR, } from '@zgsm/costrict-cli-core';
|
|
14
14
|
describe('restoreCommand', () => {
|
|
15
15
|
let mockContext;
|
|
16
16
|
let mockConfig;
|
|
@@ -10,7 +10,7 @@ import { ProxyAgent } from 'undici';
|
|
|
10
10
|
import { getGitRepoRoot, getLatestGitHubRelease, isGitHubRepository, getGitHubRepoInfo, } from '../../utils/gitUtils.js';
|
|
11
11
|
import { CommandKind } from './types.js';
|
|
12
12
|
import { getUrlOpenCommand } from '../../ui/utils/commandUtils.js';
|
|
13
|
-
import { debugLogger } from '@
|
|
13
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
14
14
|
export const GITHUB_WORKFLOW_PATHS = [
|
|
15
15
|
'gemini-dispatch/gemini-dispatch.yml',
|
|
16
16
|
'gemini-assistant/gemini-invoke.yml',
|
|
@@ -10,7 +10,7 @@ import { vi, describe, expect, it, afterEach, beforeEach } from 'vitest';
|
|
|
10
10
|
import * as gitUtils from '../../utils/gitUtils.js';
|
|
11
11
|
import { setupGithubCommand, updateGitignore, GITHUB_WORKFLOW_PATHS, } from './setupGithubCommand.js';
|
|
12
12
|
import * as commandUtils from '../utils/commandUtils.js';
|
|
13
|
-
import { debugLogger } from '@
|
|
13
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
14
14
|
vi.mock('child_process');
|
|
15
15
|
// Mock fetch globally
|
|
16
16
|
global.fetch = vi.fn();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CodeAssistServer, getCodeAssistServer } from '@
|
|
6
|
+
import { CodeAssistServer, getCodeAssistServer } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { MessageType } from '../types.js';
|
|
8
8
|
import { formatDuration } from '../utils/formatters.js';
|
|
9
9
|
import { CommandKind, } from './types.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { CommandKind } from './types.js';
|
|
7
7
|
import { terminalSetup } from '../utils/terminalSetup.js';
|
|
8
|
-
import {} from '@
|
|
8
|
+
import {} from '@zgsm/costrict-cli-core';
|
|
9
9
|
/**
|
|
10
10
|
* Command to configure terminal keybindings for multiline input support.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { ReactNode } from 'react';
|
|
7
7
|
import type { HistoryItemWithoutId, HistoryItem, ConfirmationRequest } from '../types.js';
|
|
8
|
-
import type { Config, GitService, Logger, CommandActionReturn } from '@
|
|
8
|
+
import type { Config, GitService, Logger, CommandActionReturn } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import type { LoadedSettings } from '../../config/settings.js';
|
|
10
10
|
import type { UseHistoryManagerReturn } from '../hooks/useHistoryManager.js';
|
|
11
11
|
import type { SessionStatsState } from '../contexts/SessionContext.js';
|