@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
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config, EditorType, GeminiClient, ThoughtSummary } from '@
|
|
7
|
-
import { ApprovalMode } from '@
|
|
6
|
+
import type { Config, EditorType, GeminiClient, ThoughtSummary } from '@zgsm/costrict-cli-core';
|
|
7
|
+
import { ApprovalMode } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { type PartListUnion } from '@google/genai';
|
|
9
9
|
import type { HistoryItem, HistoryItemWithoutId, SlashCommandProcessorResult } from '../types.js';
|
|
10
10
|
import { StreamingState } from '../types.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
7
|
-
import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, logUserPrompt, GitService, UnauthorizedError, UserPromptEvent, DEFAULT_GEMINI_FLASH_MODEL, logConversationFinishedEvent, ConversationFinishedEvent, ApprovalMode, parseAndFormatApiError, ToolConfirmationOutcome, promptIdContext, tokenLimit, debugLogger, runInDevTraceSpan, EDIT_TOOL_NAMES, processRestorableToolCalls, } from '@
|
|
7
|
+
import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, logUserPrompt, GitService, UnauthorizedError, UserPromptEvent, DEFAULT_GEMINI_FLASH_MODEL, logConversationFinishedEvent, ConversationFinishedEvent, ApprovalMode, parseAndFormatApiError, ToolConfirmationOutcome, promptIdContext, tokenLimit, debugLogger, runInDevTraceSpan, EDIT_TOOL_NAMES, processRestorableToolCalls, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { FinishReason } from '@google/genai';
|
|
9
9
|
import { StreamingState, MessageType, ToolCallStatus } from '../types.js';
|
|
10
10
|
import { isAtCommand, isSlashCommand } from '../utils/commandUtils.js';
|
|
@@ -11,7 +11,7 @@ import { useGeminiStream } from './useGeminiStream.js';
|
|
|
11
11
|
import { useKeypress } from './useKeypress.js';
|
|
12
12
|
import * as atCommandProcessor from './atCommandProcessor.js';
|
|
13
13
|
import { useReactToolScheduler } from './useReactToolScheduler.js';
|
|
14
|
-
import { ApprovalMode, AuthType, GeminiEventType as ServerGeminiEventType, ToolErrorType, ToolConfirmationOutcome, tokenLimit, debugLogger, } from '@
|
|
14
|
+
import { ApprovalMode, AuthType, GeminiEventType as ServerGeminiEventType, ToolErrorType, ToolConfirmationOutcome, tokenLimit, debugLogger, } from '@zgsm/costrict-cli-core';
|
|
15
15
|
import { MessageType, StreamingState } from '../types.js';
|
|
16
16
|
// --- MOCKS ---
|
|
17
17
|
const mockSendMessageStream = vi
|
|
@@ -37,7 +37,7 @@ const MockedGeminiClientClass = vi.hoisted(() => vi.fn().mockImplementation(func
|
|
|
37
37
|
}));
|
|
38
38
|
const MockedUserPromptEvent = vi.hoisted(() => vi.fn().mockImplementation(() => { }));
|
|
39
39
|
const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
|
|
40
|
-
vi.mock('@
|
|
40
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
41
41
|
const actualCoreModule = (await importOriginal());
|
|
42
42
|
return {
|
|
43
43
|
...actualCoreModule,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect, useCallback } from 'react';
|
|
7
|
-
import { spawnAsync } from '@
|
|
7
|
+
import { spawnAsync } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import fs from 'node:fs';
|
|
9
9
|
import fsPromises from 'node:fs/promises';
|
|
10
10
|
import path from 'node:path';
|
|
@@ -7,10 +7,10 @@ import { useGitBranchName } from './useGitBranchName.js';
|
|
|
7
7
|
import { fs, vol } from 'memfs';
|
|
8
8
|
import * as fsPromises from 'node:fs/promises';
|
|
9
9
|
import path from 'node:path'; // For mocking fs
|
|
10
|
-
import { spawnAsync as mockSpawnAsync } from '@
|
|
11
|
-
// Mock @
|
|
12
|
-
vi.mock('@
|
|
13
|
-
const original = await vi.importActual('@
|
|
10
|
+
import { spawnAsync as mockSpawnAsync } from '@zgsm/costrict-cli-core';
|
|
11
|
+
// Mock @zgsm/costrict-cli-core
|
|
12
|
+
vi.mock('@zgsm/costrict-cli-core', async () => {
|
|
13
|
+
const original = await vi.importActual('@zgsm/costrict-cli-core');
|
|
14
14
|
return {
|
|
15
15
|
...original,
|
|
16
16
|
spawnAsync: vi.fn(),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { HistoryItem } from '../types.js';
|
|
7
|
-
import type { ChatRecordingService } from '@
|
|
7
|
+
import type { ChatRecordingService } from '@zgsm/costrict-cli-core/src/services/chatRecordingService.js';
|
|
8
8
|
type HistoryItemUpdater = (prevItem: HistoryItem) => Partial<Omit<HistoryItem, 'id'>>;
|
|
9
9
|
export interface UseHistoryManagerReturn {
|
|
10
10
|
history: HistoryItem[];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useCallback, useEffect, useState, useSyncExternalStore, useRef, } from 'react';
|
|
7
|
-
import { IdeClient, IDEConnectionStatus, ideContextStore, } from '@
|
|
7
|
+
import { IdeClient, IDEConnectionStatus, ideContextStore, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { useSettings } from '../contexts/SettingsContext.js';
|
|
9
9
|
import { isWorkspaceTrusted } from '../../config/trustedFolders.js';
|
|
10
10
|
/**
|
|
@@ -7,12 +7,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { render } from '../../test-utils/render.js';
|
|
8
8
|
import { act } from 'react';
|
|
9
9
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
10
|
-
import { IdeClient, IDEConnectionStatus, ideContextStore, } from '@
|
|
10
|
+
import { IdeClient, IDEConnectionStatus, ideContextStore, } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { useIdeTrustListener } from './useIdeTrustListener.js';
|
|
12
12
|
import * as trustedFolders from '../../config/trustedFolders.js';
|
|
13
13
|
import { useSettings } from '../contexts/SettingsContext.js';
|
|
14
14
|
// Mock dependencies
|
|
15
|
-
vi.mock('@
|
|
15
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
16
16
|
const original = await importOriginal();
|
|
17
17
|
const ideClientInstance = {
|
|
18
18
|
addTrustChangeListener: vi.fn(),
|
|
@@ -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 { UseHistoryManagerReturn } from './useHistoryManager.js';
|
|
8
8
|
export declare function useIncludeDirsTrust(config: Config, isTrustedFolder: boolean | undefined, historyManager: UseHistoryManagerReturn, setCustomDialog: (dialog: React.ReactNode | null) => void): void;
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { useEffect } from 'react';
|
|
8
8
|
import { loadTrustedFolders } from '../../config/trustedFolders.js';
|
|
9
9
|
import { expandHomeDir } from '../utils/directoryUtils.js';
|
|
10
|
-
import { refreshServerHierarchicalMemory } from '@
|
|
10
|
+
import { refreshServerHierarchicalMemory } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { MultiFolderTrustDialog } from '../components/MultiFolderTrustDialog.js';
|
|
12
12
|
import { MessageType } from '../types.js';
|
|
13
13
|
async function finishAddingDirectories(config, addItem, added, errors) {
|
|
@@ -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 { useState, useCallback } from 'react';
|
|
8
8
|
/**
|
|
9
9
|
* Hook for independently managing input history.
|
|
@@ -7,7 +7,7 @@ import { act } from 'react';
|
|
|
7
7
|
import { renderHook } from '../../test-utils/render.js';
|
|
8
8
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
9
9
|
import { useInputHistoryStore } from './useInputHistoryStore.js';
|
|
10
|
-
import { debugLogger } from '@
|
|
10
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
describe('useInputHistoryStore', () => {
|
|
12
12
|
beforeEach(() => {
|
|
13
13
|
vi.clearAllMocks();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Storage } from '@
|
|
7
|
-
import { Logger } from '@
|
|
6
|
+
import type { Storage } from '@zgsm/costrict-cli-core';
|
|
7
|
+
import { Logger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
/**
|
|
9
9
|
* Hook to manage the logger instance.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect } from 'react';
|
|
7
|
-
import { sessionId, Logger } from '@
|
|
7
|
+
import { sessionId, Logger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
/**
|
|
9
9
|
* Hook to manage the logger instance.
|
|
10
10
|
*/
|
|
@@ -10,7 +10,7 @@ import { loadTrustedFolders, TrustLevel, isWorkspaceTrusted, } from '../../confi
|
|
|
10
10
|
import { useSettings } from '../contexts/SettingsContext.js';
|
|
11
11
|
import { MessageType } from '../types.js';
|
|
12
12
|
import {} from './useHistoryManager.js';
|
|
13
|
-
import { coreEvents } from '@
|
|
13
|
+
import { coreEvents } from '@zgsm/costrict-cli-core';
|
|
14
14
|
function getInitialTrustState(settings, cwd, isCurrentWorkspace) {
|
|
15
15
|
const folders = loadTrustedFolders();
|
|
16
16
|
const explicitTrustLevel = folders.user.config[cwd];
|
|
@@ -8,7 +8,7 @@ import { act } from 'react';
|
|
|
8
8
|
import { renderHook } from '../../test-utils/render.js';
|
|
9
9
|
import { usePermissionsModifyTrust } from './usePermissionsModifyTrust.js';
|
|
10
10
|
import { TrustLevel } from '../../config/trustedFolders.js';
|
|
11
|
-
import { coreEvents } from '@
|
|
11
|
+
import { coreEvents } from '@zgsm/costrict-cli-core';
|
|
12
12
|
// Hoist mocks
|
|
13
13
|
const mockedCwd = vi.hoisted(() => vi.fn());
|
|
14
14
|
const mockedLoadTrustedFolders = vi.hoisted(() => vi.fn());
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect, useCallback } from 'react';
|
|
7
|
-
import { UserTierId, getCodeAssistServer, } from '@
|
|
7
|
+
import { UserTierId, getCodeAssistServer, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
export const usePrivacySettings = (config) => {
|
|
9
9
|
const [privacyState, setPrivacyState] = useState({
|
|
10
10
|
isLoading: true,
|
|
@@ -7,11 +7,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
8
8
|
import { act } from 'react';
|
|
9
9
|
import { render } from '../../test-utils/render.js';
|
|
10
|
-
import { UserTierId, getCodeAssistServer } from '@
|
|
10
|
+
import { UserTierId, getCodeAssistServer } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { usePrivacySettings } from './usePrivacySettings.js';
|
|
12
12
|
import { waitFor } from '../../test-utils/async.js';
|
|
13
13
|
// Mock the dependencies
|
|
14
|
-
vi.mock('@
|
|
14
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
15
15
|
const actual = await importOriginal();
|
|
16
16
|
return {
|
|
17
17
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
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 { TextBuffer } from '../components/shared/text-buffer.js';
|
|
8
8
|
export declare const PROMPT_COMPLETION_MIN_LENGTH = 5;
|
|
9
9
|
export declare const PROMPT_COMPLETION_DEBOUNCE_MS = 250;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
7
|
-
import { debugLogger, getResponseText } from '@
|
|
7
|
+
import { debugLogger, getResponseText } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { isSlashCommand } from '../utils/commandUtils.js';
|
|
9
9
|
export const PROMPT_COMPLETION_MIN_LENGTH = 5;
|
|
10
10
|
export const PROMPT_COMPLETION_DEBOUNCE_MS = 250;
|
|
@@ -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 FallbackIntent, type UserTierId } from '@
|
|
6
|
+
import { type Config, type FallbackIntent, type UserTierId } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { type UseHistoryManagerReturn } from './useHistoryManager.js';
|
|
8
8
|
import { type ProQuotaDialogRequest } from '../contexts/UIStateContext.js';
|
|
9
9
|
interface UseQuotaAndFallbackArgs {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AuthType, TerminalQuotaError, ModelNotFoundError, PREVIEW_GEMINI_MODEL, DEFAULT_GEMINI_MODEL, } from '@
|
|
6
|
+
import { AuthType, TerminalQuotaError, ModelNotFoundError, PREVIEW_GEMINI_MODEL, DEFAULT_GEMINI_MODEL, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
8
8
|
import {} from './useHistoryManager.js';
|
|
9
9
|
import { MessageType } from '../types.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { vi, describe, it, expect, beforeEach, afterEach, } from 'vitest';
|
|
7
7
|
import { act } from 'react';
|
|
8
8
|
import { renderHook } from '../../test-utils/render.js';
|
|
9
|
-
import { UserTierId, AuthType, TerminalQuotaError, makeFakeConfig, RetryableQuotaError, PREVIEW_GEMINI_MODEL, ModelNotFoundError, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, } from '@
|
|
9
|
+
import { UserTierId, AuthType, TerminalQuotaError, makeFakeConfig, RetryableQuotaError, PREVIEW_GEMINI_MODEL, ModelNotFoundError, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { useQuotaAndFallback } from './useQuotaAndFallback.js';
|
|
11
11
|
import { MessageType } from '../types.js';
|
|
12
12
|
describe('useQuotaAndFallback', () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config, ToolCallRequestInfo, ExecutingToolCall, ScheduledToolCall, ValidatingToolCall, WaitingToolCall, CompletedToolCall, CancelledToolCall, EditorType } from '@
|
|
6
|
+
import type { Config, ToolCallRequestInfo, ExecutingToolCall, ScheduledToolCall, ValidatingToolCall, WaitingToolCall, CompletedToolCall, CancelledToolCall, EditorType } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { HistoryItemToolGroup } from '../types.js';
|
|
8
8
|
export type ScheduleFn = (request: ToolCallRequestInfo | ToolCallRequestInfo[], signal: AbortSignal) => void;
|
|
9
9
|
export type MarkToolsAsSubmittedFn = (callIds: string[]) => void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CoreToolScheduler, debugLogger } from '@
|
|
6
|
+
import { CoreToolScheduler, debugLogger } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { useCallback, useState, useMemo, useEffect, useRef } from 'react';
|
|
8
8
|
import { ToolCallStatus } from '../types.js';
|
|
9
9
|
export function useReactToolScheduler(onComplete, config, getPreferredEditor) {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CoreToolScheduler } from '@
|
|
6
|
+
import { CoreToolScheduler } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { renderHook } from '../../test-utils/render.js';
|
|
8
8
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
9
9
|
import { useReactToolScheduler } from './useReactToolScheduler.js';
|
|
10
|
-
vi.mock('@
|
|
10
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
11
11
|
const actual = await importOriginal();
|
|
12
12
|
return {
|
|
13
13
|
...actual,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { HistoryItemWithoutId } from '../types.js';
|
|
7
|
-
import type { Config, ConversationRecord, ResumedSessionData } from '@
|
|
7
|
+
import type { Config, ConversationRecord, ResumedSessionData } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import type { Part } from '@google/genai';
|
|
9
9
|
import type { SessionInfo } from '../../utils/sessionUtils.js';
|
|
10
10
|
export declare const useSessionBrowser: (config: Config, onLoadHistory: (uiHistory: HistoryItemWithoutId[], clientHistory: Array<{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { useState, useCallback } from 'react';
|
|
7
7
|
import * as fs from 'node:fs/promises';
|
|
8
8
|
import path from 'node:path';
|
|
9
|
-
import { partListUnionToString } from '@
|
|
9
|
+
import { partListUnionToString } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { MessageType, ToolCallStatus } from '../types.js';
|
|
11
11
|
export const useSessionBrowser = (config, onLoadHistory) => {
|
|
12
12
|
const [isSessionBrowserOpen, setIsSessionBrowserOpen] = useState(false);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config, ResumedSessionData } from '@
|
|
6
|
+
import type { Config, ResumedSessionData } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { Part } from '@google/genai';
|
|
8
8
|
import type { HistoryItemWithoutId } from '../types.js';
|
|
9
9
|
import type { UseHistoryManagerReturn } from './useHistoryManager.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Storage } from '@
|
|
6
|
+
import { Storage } from '@zgsm/costrict-cli-core';
|
|
7
7
|
export interface UseShellHistoryReturn {
|
|
8
8
|
history: string[];
|
|
9
9
|
addCommandToHistory: (command: string) => void;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { useState, useEffect, useCallback } from 'react';
|
|
7
7
|
import * as fs from 'node:fs/promises';
|
|
8
8
|
import * as path from 'node:path';
|
|
9
|
-
import { isNodeError, Storage } from '@
|
|
9
|
+
import { isNodeError, Storage } from '@zgsm/costrict-cli-core';
|
|
10
10
|
const MAX_HISTORY_LENGTH = 100;
|
|
11
11
|
async function getHistoryFilePath(projectRoot, configStorage) {
|
|
12
12
|
const storage = configStorage ?? new Storage(projectRoot);
|
|
@@ -11,7 +11,7 @@ import { useShellHistory } from './useShellHistory.js';
|
|
|
11
11
|
import * as fs from 'node:fs/promises';
|
|
12
12
|
import * as path from 'node:path';
|
|
13
13
|
import * as crypto from 'node:crypto';
|
|
14
|
-
import { GEMINI_DIR } from '@
|
|
14
|
+
import { GEMINI_DIR } from '@zgsm/costrict-cli-core';
|
|
15
15
|
vi.mock('node:fs/promises', () => ({
|
|
16
16
|
readFile: vi.fn(),
|
|
17
17
|
writeFile: vi.fn(),
|
|
@@ -33,7 +33,7 @@ vi.mock('node:fs', async (importOriginal) => {
|
|
|
33
33
|
mkdirSync: vi.fn(),
|
|
34
34
|
};
|
|
35
35
|
});
|
|
36
|
-
vi.mock('@
|
|
36
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
37
37
|
const actual = await importOriginal();
|
|
38
38
|
const path = await import('node:path');
|
|
39
39
|
class Storage {
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Message } from '../types.js';
|
|
7
|
-
import { type Config } from '@
|
|
7
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import type { LoadedSettings } from '../../config/settings.js';
|
|
9
9
|
export declare function createShowMemoryAction(config: Config | null, settings: LoadedSettings, addMessage: (message: Message) => void): () => Promise<void>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { MessageType } from '../types.js';
|
|
7
|
-
import { debugLogger } from '@
|
|
7
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
export function createShowMemoryAction(config, settings, addMessage) {
|
|
9
9
|
return async () => {
|
|
10
10
|
if (!config) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { useState, useEffect, useMemo } from 'react';
|
|
7
7
|
import { AsyncFzf } from 'fzf';
|
|
8
8
|
import { CommandKind, } from '../commands/types.js';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
// Utility function to safely handle errors without information disclosure
|
|
11
11
|
function logErrorSafely(error, context) {
|
|
12
12
|
if (error instanceof Error) {
|
|
@@ -7,12 +7,12 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
|
7
7
|
import { act } from 'react';
|
|
8
8
|
import { renderHook } from '../../test-utils/render.js';
|
|
9
9
|
import { useReactToolScheduler, mapToDisplay, } from './useReactToolScheduler.js';
|
|
10
|
-
import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, ToolConfirmationOutcome, ApprovalMode, MockTool, HookSystem, PREVIEW_GEMINI_MODEL, } from '@
|
|
11
|
-
import { createMockMessageBus } from '@
|
|
10
|
+
import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, ToolConfirmationOutcome, ApprovalMode, MockTool, HookSystem, PREVIEW_GEMINI_MODEL, } from '@zgsm/costrict-cli-core';
|
|
11
|
+
import { createMockMessageBus } from '@zgsm/costrict-cli-core/src/test-utils/mock-message-bus.js';
|
|
12
12
|
import { ToolCallStatus } from '../types.js';
|
|
13
13
|
// Mocks
|
|
14
|
-
vi.mock('@
|
|
15
|
-
const actual = await vi.importActual('@
|
|
14
|
+
vi.mock('@zgsm/costrict-cli-core', async () => {
|
|
15
|
+
const actual = await vi.importActual('@zgsm/costrict-cli-core');
|
|
16
16
|
// Patch CoreToolScheduler to have cancelAll if it's missing in the test environment
|
|
17
17
|
if (actual.CoreToolScheduler &&
|
|
18
18
|
!actual.CoreToolScheduler.prototype.cancelAll) {
|
package/dist/src/ui/hooks/vim.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { useCallback, useReducer, useEffect } from 'react';
|
|
7
7
|
import { useVimMode } from '../contexts/VimModeContext.js';
|
|
8
|
-
import { debugLogger } from '@
|
|
8
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
9
9
|
// Constants
|
|
10
10
|
const DIGIT_MULTIPLIER = 10;
|
|
11
11
|
const DEFAULT_COUNT = 1;
|
|
@@ -3,7 +3,7 @@
|
|
|
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
|
interface CloudFreePrivacyNoticeProps {
|
|
8
8
|
config: Config;
|
|
9
9
|
onExit: () => void;
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { Box } from 'ink';
|
|
8
|
-
import { AuthType } from '@
|
|
8
|
+
import { AuthType } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { GeminiPrivacyNotice } from './GeminiPrivacyNotice.js';
|
|
10
10
|
import { CloudPaidPrivacyNotice } from './CloudPaidPrivacyNotice.js';
|
|
11
11
|
import { CloudFreePrivacyNotice } from './CloudFreePrivacyNotice.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 tinygradient from 'tinygradient';
|
|
8
8
|
// Mapping from common CSS color names (lowercase) to hex codes (lowercase)
|
|
9
9
|
// Excludes names directly supported by Ink
|
|
@@ -23,7 +23,7 @@ import { ANSI } from './ansi.js';
|
|
|
23
23
|
import { ANSILight } from './ansi-light.js';
|
|
24
24
|
import { NoColorTheme } from './no-color.js';
|
|
25
25
|
import process from 'node:process';
|
|
26
|
-
import { debugLogger } from '@
|
|
26
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
27
27
|
export const DEFAULT_THEME = DefaultDark;
|
|
28
28
|
class ThemeManager {
|
|
29
29
|
availableThemes;
|
|
@@ -11,7 +11,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
|
11
11
|
import { themeManager, DEFAULT_THEME } from './theme-manager.js';
|
|
12
12
|
import * as fs from 'node:fs';
|
|
13
13
|
import * as os from 'node:os';
|
|
14
|
-
import { debugLogger } from '@
|
|
14
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
15
15
|
vi.mock('node:fs');
|
|
16
16
|
vi.mock('node:os', async (importOriginal) => {
|
|
17
17
|
const actualOs = await importOriginal();
|
package/dist/src/ui/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { CompressionStatus, GeminiCLIExtension, MCPServerConfig, ThoughtSummary, ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolResultDisplay, RetrieveUserQuotaResponse } from '@
|
|
6
|
+
import type { CompressionStatus, GeminiCLIExtension, MCPServerConfig, ThoughtSummary, ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolResultDisplay, RetrieveUserQuotaResponse } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { PartListUnion } from '@google/genai';
|
|
8
8
|
import { type ReactNode } from 'react';
|
|
9
9
|
export type { ThoughtSummary };
|
|
@@ -9,7 +9,7 @@ import { Text, Box } from 'ink';
|
|
|
9
9
|
import { common, createLowlight } from 'lowlight';
|
|
10
10
|
import { themeManager } from '../themes/theme-manager.js';
|
|
11
11
|
import { MaxSizedBox, MINIMUM_MAX_HEIGHT, } from '../components/shared/MaxSizedBox.js';
|
|
12
|
-
import { debugLogger } from '@
|
|
12
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
13
13
|
import { isAlternateBufferEnabled } from '../hooks/useAlternateBuffer.js';
|
|
14
14
|
// Configure theming and parsing utilities.
|
|
15
15
|
const lowlight = createLowlight(common);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { writeToStdout } from '@
|
|
6
|
+
import { writeToStdout } from '@zgsm/costrict-cli-core';
|
|
7
7
|
const ENABLE_BRACKETED_PASTE = '\x1b[?2004h';
|
|
8
8
|
const DISABLE_BRACKETED_PASTE = '\x1b[?2004l';
|
|
9
9
|
export const enableBracketedPaste = () => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from 'node:fs/promises';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
|
-
import { debugLogger, spawnAsync, unescapePath, escapePath, } from '@
|
|
8
|
+
import { debugLogger, spawnAsync, unescapePath, escapePath, } from '@zgsm/costrict-cli-core';
|
|
9
9
|
/**
|
|
10
10
|
* Supported image file extensions based on Gemini API.
|
|
11
11
|
* See: https://ai.google.dev/gemini-api/docs/image-understanding
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { vi, describe, it, expect } from 'vitest';
|
|
7
7
|
import { expandHomeDir } from './directoryUtils.js';
|
|
8
8
|
import * as path from 'node:path';
|
|
9
|
-
vi.mock('@
|
|
9
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
10
10
|
const original = await importOriginal();
|
|
11
11
|
return {
|
|
12
12
|
...original,
|
|
@@ -78,7 +78,7 @@ export async function detectAndEnableKittyProtocol() {
|
|
|
78
78
|
timeoutId = setTimeout(finish, 200);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
import { enableKittyKeyboardProtocol, disableKittyKeyboardProtocol, } from '@
|
|
81
|
+
import { enableKittyKeyboardProtocol, disableKittyKeyboardProtocol, } from '@zgsm/costrict-cli-core';
|
|
82
82
|
export function isKittyProtocolEnabled() {
|
|
83
83
|
return kittyEnabled;
|
|
84
84
|
}
|
|
@@ -13,7 +13,7 @@ const mocks = vi.hoisted(() => ({
|
|
|
13
13
|
vi.mock('node:fs', () => ({
|
|
14
14
|
writeSync: mocks.writeSync,
|
|
15
15
|
}));
|
|
16
|
-
vi.mock('@
|
|
16
|
+
vi.mock('@zgsm/costrict-cli-core', () => ({
|
|
17
17
|
enableKittyKeyboardProtocol: mocks.enableKittyKeyboardProtocol,
|
|
18
18
|
disableKittyKeyboardProtocol: mocks.disableKittyKeyboardProtocol,
|
|
19
19
|
}));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { enableMouseEvents, disableMouseEvents } from '@
|
|
6
|
+
import { enableMouseEvents, disableMouseEvents } from '@zgsm/costrict-cli-core';
|
|
7
7
|
export type MouseEventName = 'left-press' | 'left-release' | 'right-press' | 'right-release' | 'middle-press' | 'middle-release' | 'scroll-up' | 'scroll-down' | 'scroll-left' | 'scroll-right' | 'move';
|
|
8
8
|
export interface MouseEvent {
|
|
9
9
|
name: MouseEventName;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { enableMouseEvents, disableMouseEvents } from '@
|
|
6
|
+
import { enableMouseEvents, disableMouseEvents } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { SGR_MOUSE_REGEX, X11_MOUSE_REGEX, SGR_EVENT_PREFIX, X11_EVENT_PREFIX, couldBeMouseSequence as inputCouldBeMouseSequence, } from './input.js';
|
|
8
8
|
export function getMouseEventName(buttonCode, isRelease) {
|
|
9
9
|
const isMove = (buttonCode & 32) !== 0;
|