@ycodium-ai/plugin-api 0.2.5634 → 0.2.5751
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/README.md +55 -65
- package/dist/_private/ycodium-attachment-kinds/chatAttachmentKinds.d.ts +34 -0
- package/dist/_private/ycodium-attachment-kinds/chatAttachmentKinds.js +70 -0
- package/dist/_private/ycodium-attachment-kinds/mediaKinds.d.ts +23 -0
- package/dist/_private/ycodium-attachment-kinds/mediaKinds.js +73 -0
- package/dist/_private/ycodium-composer-tokens/approvalFileChanges.d.ts +20 -0
- package/dist/_private/ycodium-composer-tokens/approvalFileChanges.js +45 -0
- package/dist/_private/ycodium-composer-tokens/composerFileLink.d.ts +1 -0
- package/dist/_private/ycodium-composer-tokens/composerFileLink.js +20 -0
- package/dist/_private/ycodium-composer-tokens/composerInlineTokens.d.ts +17 -0
- package/dist/_private/ycodium-composer-tokens/composerInlineTokens.js +91 -0
- package/dist/_private/ycodium-composer-tokens/composerLogic.d.ts +30 -0
- package/dist/_private/ycodium-composer-tokens/composerLogic.js +181 -0
- package/dist/_private/ycodium-composer-tokens/composerMentionDrag.d.ts +40 -0
- package/dist/_private/ycodium-composer-tokens/composerMentionDrag.js +60 -0
- package/dist/_private/ycodium-composer-tokens/composerPromptSegments.d.ts +16 -0
- package/dist/_private/ycodium-composer-tokens/composerPromptSegments.js +142 -0
- package/dist/_private/ycodium-composer-tokens/composerTrigger.d.ts +18 -0
- package/dist/_private/ycodium-composer-tokens/composerTrigger.js +44 -0
- package/dist/_private/ycodium-composer-tokens/contextWindowFormat.d.ts +2 -0
- package/dist/_private/ycodium-composer-tokens/contextWindowFormat.js +16 -0
- package/dist/_private/ycodium-composer-tokens/diffCount.d.ts +2 -0
- package/dist/_private/ycodium-composer-tokens/diffCount.js +15 -0
- package/dist/_private/ycodium-composer-tokens/pendingUserInput.d.ts +48 -0
- package/dist/_private/ycodium-composer-tokens/pendingUserInput.js +145 -0
- package/dist/_private/ycodium-composer-tokens/promptContextBlocks.d.ts +58 -0
- package/dist/_private/ycodium-composer-tokens/promptContextBlocks.js +121 -0
- package/dist/_private/ycodium-composer-tokens/proposedPlan.d.ts +21 -0
- package/dist/_private/ycodium-composer-tokens/proposedPlan.js +106 -0
- package/dist/_private/ycodium-composer-tokens/providerSkillSearch.d.ts +3 -0
- package/dist/_private/ycodium-composer-tokens/providerSkillSearch.js +79 -0
- package/dist/_private/ycodium-composer-tokens/providerSkills.d.ts +17 -0
- package/dist/_private/ycodium-composer-tokens/providerSkills.js +57 -0
- package/dist/_private/ycodium-composer-tokens/queueEntry.d.ts +31 -0
- package/dist/_private/ycodium-composer-tokens/queueEntry.js +44 -0
- package/dist/_private/ycodium-composer-tokens/reviewCommentBlocks.d.ts +29 -0
- package/dist/_private/ycodium-composer-tokens/reviewCommentBlocks.js +118 -0
- package/dist/_private/ycodium-composer-tokens/searchRanking.d.ts +27 -0
- package/dist/_private/ycodium-composer-tokens/searchRanking.js +129 -0
- package/dist/_private/ycodium-composer-tokens/skillTokens.d.ts +101 -0
- package/dist/_private/ycodium-composer-tokens/skillTokens.js +148 -0
- package/dist/_private/ycodium-composer-tokens/slashMenu.d.ts +130 -0
- package/dist/_private/ycodium-composer-tokens/slashMenu.js +175 -0
- package/dist/_private/ycodium-composer-tokens/userInputOptionText.d.ts +33 -0
- package/dist/_private/ycodium-composer-tokens/userInputOptionText.js +27 -0
- package/dist/_private/ycodium-credential-account/credentialAccount.d.ts +21 -0
- package/dist/_private/ycodium-credential-account/credentialAccount.js +62 -0
- package/dist/_private/ycodium-credential-account/quotaJson.d.ts +12 -0
- package/dist/_private/ycodium-credential-account/quotaJson.js +14 -0
- package/dist/_private/ycodium-credential-account/quotaRequest.d.ts +32 -0
- package/dist/_private/ycodium-credential-account/quotaRequest.js +60 -0
- package/dist/_private/ycodium-day-format/dayFormat.d.ts +31 -0
- package/dist/_private/ycodium-day-format/dayFormat.js +32 -0
- package/dist/_private/ycodium-day-format/timestampFormat.d.ts +35 -0
- package/dist/_private/ycodium-day-format/timestampFormat.js +119 -0
- package/dist/_private/ycodium-decision-order/decisionOrder.d.ts +19 -0
- package/dist/_private/ycodium-decision-order/decisionOrder.js +38 -0
- package/dist/_private/ycodium-diff-format/diffRendering.d.ts +42 -0
- package/dist/_private/ycodium-diff-format/diffRendering.js +171 -0
- package/dist/_private/ycodium-duration-format/durationFormat.d.ts +20 -0
- package/dist/_private/ycodium-duration-format/durationFormat.js +56 -0
- package/dist/_private/ycodium-fetch-ports/fetchPorts.d.ts +36 -0
- package/dist/_private/ycodium-fetch-ports/fetchPorts.js +69 -0
- package/dist/_private/ycodium-fetch-ports/netFault.d.ts +10 -0
- package/dist/_private/ycodium-fetch-ports/netFault.js +17 -0
- package/dist/_private/ycodium-full-access-mode/fullAccessNativeMode.d.ts +28 -0
- package/dist/_private/ycodium-full-access-mode/fullAccessNativeMode.js +30 -0
- package/dist/_private/ycodium-instance-config/homePath.d.ts +34 -0
- package/dist/_private/ycodium-instance-config/homePath.js +85 -0
- package/dist/_private/ycodium-instance-config/instanceConfig.d.ts +46 -0
- package/dist/_private/ycodium-instance-config/instanceConfig.js +111 -0
- package/dist/_private/ycodium-instance-config/launchArgs.d.ts +5 -0
- package/dist/_private/ycodium-instance-config/launchArgs.js +65 -0
- package/dist/_private/ycodium-instance-config/probeProcess.d.ts +39 -0
- package/dist/_private/ycodium-instance-config/probeProcess.js +55 -0
- package/dist/_private/ycodium-instance-config/programHomeSchema.d.ts +44 -0
- package/dist/_private/ycodium-instance-config/programHomeSchema.js +60 -0
- package/dist/_private/ycodium-instance-config/tomlScalar.d.ts +5 -0
- package/dist/_private/ycodium-instance-config/tomlScalar.js +11 -0
- package/dist/_private/ycodium-jsonl-stream/appendedJsonl.d.ts +47 -0
- package/dist/_private/ycodium-jsonl-stream/appendedJsonl.js +172 -0
- package/dist/_private/ycodium-jsonl-stream/claudeSessions.d.ts +63 -0
- package/dist/_private/ycodium-jsonl-stream/claudeSessions.js +220 -0
- package/dist/_private/ycodium-jsonl-stream/codexSessions.d.ts +41 -0
- package/dist/_private/ycodium-jsonl-stream/codexSessions.js +197 -0
- package/dist/_private/ycodium-jsonl-stream/history.d.ts +6 -0
- package/dist/_private/ycodium-jsonl-stream/history.js +389 -0
- package/dist/_private/ycodium-jsonl-stream/historyErrors.d.ts +6 -0
- package/dist/_private/ycodium-jsonl-stream/historyErrors.js +6 -0
- package/dist/_private/ycodium-jsonl-stream/historyFile.d.ts +19 -0
- package/dist/_private/ycodium-jsonl-stream/historyFile.js +117 -0
- package/dist/_private/ycodium-jsonl-stream/historyRecord.d.ts +31 -0
- package/dist/_private/ycodium-jsonl-stream/historyRecord.js +144 -0
- package/dist/_private/ycodium-jsonl-stream/historyWaiting.d.ts +8 -0
- package/dist/_private/ycodium-jsonl-stream/historyWaiting.js +142 -0
- package/dist/_private/ycodium-jsonl-stream/jsonObjectLine.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/jsonObjectLine.js +18 -0
- package/dist/_private/ycodium-jsonl-stream/jsonlStream.d.ts +79 -0
- package/dist/_private/ycodium-jsonl-stream/jsonlStream.js +603 -0
- package/dist/_private/ycodium-jsonl-stream/scanCache.d.ts +69 -0
- package/dist/_private/ycodium-jsonl-stream/scanCache.js +106 -0
- package/dist/_private/ycodium-jsonl-stream/sessionDirectory.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/sessionDirectory.js +32 -0
- package/dist/_private/ycodium-jsonl-stream/sessionTranscript.d.ts +16 -0
- package/dist/_private/ycodium-jsonl-stream/sessionTranscript.js +112 -0
- package/dist/_private/ycodium-jsonl-stream/usageFields.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/usageFields.js +11 -0
- package/dist/_private/ycodium-markdown-fence/markdownFence.d.ts +6 -0
- package/dist/_private/ycodium-markdown-fence/markdownFence.js +24 -0
- package/dist/_private/ycodium-source-control/pullRequestScope.d.ts +23 -0
- package/dist/_private/ycodium-source-control/pullRequestScope.js +29 -0
- package/dist/_private/ycodium-sse-stream/sseStream.d.ts +37 -0
- package/dist/_private/ycodium-sse-stream/sseStream.js +104 -0
- package/dist/_private/ycodium-system-text/memberInstructions.d.ts +13 -0
- package/dist/_private/ycodium-system-text/memberInstructions.js +9 -0
- package/dist/_private/ycodium-system-text/systemText.d.ts +179 -0
- package/dist/_private/ycodium-system-text/systemText.js +257 -0
- package/dist/_private/ycodium-system-text/threadPreset.d.ts +18 -0
- package/dist/_private/ycodium-system-text/threadPreset.js +21 -0
- package/dist/_private/ycodium-text-generation/branchName.d.ts +6 -0
- package/dist/_private/ycodium-text-generation/branchName.js +26 -0
- package/dist/_private/ycodium-text-generation/prompts.d.ts +70 -0
- package/dist/_private/ycodium-text-generation/prompts.js +266 -0
- package/dist/_private/ycodium-text-generation/sanitize.d.ts +10 -0
- package/dist/_private/ycodium-text-generation/sanitize.js +124 -0
- package/dist/_private/ycodium-text-generation/structuredTextGeneration.d.ts +29 -0
- package/dist/_private/ycodium-text-generation/structuredTextGeneration.js +163 -0
- package/dist/_private/ycodium-tool-label/toolLabel.d.ts +42 -0
- package/dist/_private/ycodium-tool-label/toolLabel.js +249 -0
- package/dist/_private/ycodium-ui-hooks/DiffStatCounts.d.ts +22 -0
- package/dist/_private/ycodium-ui-hooks/DiffStatCounts.js +22 -0
- package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.d.ts +29 -0
- package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.js +13 -0
- package/dist/_private/ycodium-ui-hooks/RenderErrorBoundary.d.ts +28 -0
- package/dist/_private/ycodium-ui-hooks/RenderErrorBoundary.js +22 -0
- package/dist/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.d.ts +19 -0
- package/dist/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.js +7 -0
- package/dist/_private/ycodium-ui-hooks/SkillInlineText.d.ts +13 -0
- package/dist/_private/ycodium-ui-hooks/SkillInlineText.js +13 -0
- package/dist/_private/ycodium-ui-hooks/bundleStyle.d.ts +4 -0
- package/dist/_private/ycodium-ui-hooks/bundleStyle.js +52 -0
- package/dist/_private/ycodium-ui-hooks/catalogKeys.d.ts +9 -0
- package/dist/_private/ycodium-ui-hooks/catalogKeys.js +1 -0
- package/dist/_private/ycodium-ui-hooks/clipboard.d.ts +22 -0
- package/dist/_private/ycodium-ui-hooks/clipboard.js +149 -0
- package/dist/_private/ycodium-ui-hooks/hostControls.d.ts +24 -0
- package/dist/_private/ycodium-ui-hooks/hostControls.js +25 -0
- package/dist/_private/ycodium-ui-hooks/inlineChips.d.ts +50 -0
- package/dist/_private/ycodium-ui-hooks/inlineChips.js +32 -0
- package/dist/_private/ycodium-ui-hooks/notifyMessages.d.ts +20 -0
- package/dist/_private/ycodium-ui-hooks/notifyMessages.js +26 -0
- package/dist/_private/ycodium-ui-hooks/presenterInputState.d.ts +52 -0
- package/dist/_private/ycodium-ui-hooks/presenterInputState.js +240 -0
- package/dist/_private/ycodium-ui-hooks/processRowHeader.d.ts +6 -0
- package/dist/_private/ycodium-ui-hooks/processRowHeader.js +6 -0
- package/dist/_private/ycodium-ui-hooks/timelineDisclosure.d.ts +5 -0
- package/dist/_private/ycodium-ui-hooks/timelineDisclosure.js +73 -0
- package/dist/_private/ycodium-ui-hooks/useMediaQuery.d.ts +20 -0
- package/dist/_private/ycodium-ui-hooks/useMediaQuery.js +70 -0
- package/dist/_private/ycodium-ui-hooks/workEntryIcons.d.ts +25 -0
- package/dist/_private/ycodium-ui-hooks/workEntryIcons.js +66 -0
- package/dist/_private/ycodium-workspace-path/directoryScope.d.ts +5 -0
- package/dist/_private/ycodium-workspace-path/directoryScope.js +28 -0
- package/dist/_private/ycodium-workspace-path/workspacePath.d.ts +19 -0
- package/dist/_private/ycodium-workspace-path/workspacePath.js +90 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js.map +1 -1
- package/dist/capabilityPorts.d.ts.map +1 -1
- package/dist/capabilityPorts.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/communication-view.d.ts.map +1 -1
- package/dist/communication-view.js.map +1 -1
- package/dist/communication.d.ts.map +1 -1
- package/dist/communication.js.map +1 -1
- package/dist/composer-control.d.ts.map +1 -1
- package/dist/composer-control.js.map +1 -1
- package/dist/composer.d.ts +22 -0
- package/dist/composer.d.ts.map +1 -0
- package/dist/composer.js +22 -0
- package/dist/composer.js.map +1 -0
- package/dist/conversation-queue.d.ts.map +1 -1
- package/dist/conversation-queue.js.map +1 -1
- package/dist/conversation-view.d.ts.map +1 -1
- package/dist/conversation-view.js.map +1 -1
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js.map +1 -1
- package/dist/conversationAttachments.d.ts.map +1 -1
- package/dist/conversationAttachments.js.map +1 -1
- package/dist/conversationBase.d.ts.map +1 -1
- package/dist/conversationBase.js.map +1 -1
- package/dist/conversationComposerApi.d.ts.map +1 -1
- package/dist/conversationComposerApi.js.map +1 -1
- package/dist/conversationComposerEnvironment.d.ts.map +1 -1
- package/dist/conversationComposerEnvironment.js.map +1 -1
- package/dist/conversationComposerHandle.d.ts.map +1 -1
- package/dist/conversationComposerHandle.js.map +1 -1
- package/dist/conversationComposerParts.d.ts.map +1 -1
- package/dist/conversationComposerParts.js.map +1 -1
- package/dist/conversationDerive.d.ts.map +1 -1
- package/dist/conversationDerive.js.map +1 -1
- package/dist/conversationDrafts.d.ts.map +1 -1
- package/dist/conversationDrafts.js.map +1 -1
- package/dist/conversationForks.d.ts.map +1 -1
- package/dist/conversationForks.js.map +1 -1
- package/dist/conversationHostModels.d.ts.map +1 -1
- package/dist/conversationHostModels.js.map +1 -1
- package/dist/conversationLoadFailure.d.ts.map +1 -1
- package/dist/conversationLoadFailure.js.map +1 -1
- package/dist/conversationMemberMentions.d.ts.map +1 -1
- package/dist/conversationMemberMentions.js.map +1 -1
- package/dist/conversationMessageLinks.d.ts.map +1 -1
- package/dist/conversationMessageLinks.js.map +1 -1
- package/dist/conversationMessageMemory.d.ts.map +1 -1
- package/dist/conversationMessageMemory.js.map +1 -1
- package/dist/conversationPresets.d.ts.map +1 -1
- package/dist/conversationPresets.js.map +1 -1
- package/dist/conversationRows.d.ts.map +1 -1
- package/dist/conversationRows.js.map +1 -1
- package/dist/conversationSessionMessage.d.ts.map +1 -1
- package/dist/conversationSessionMessage.js.map +1 -1
- package/dist/conversationSkills.d.ts.map +1 -1
- package/dist/conversationSkills.js.map +1 -1
- package/dist/conversationTrajectory.d.ts.map +1 -1
- package/dist/conversationTrajectory.js.map +1 -1
- package/dist/conversationTranscript.d.ts.map +1 -1
- package/dist/conversationTranscript.js.map +1 -1
- package/dist/conversationTurnSummaries.d.ts.map +1 -1
- package/dist/conversationTurnSummaries.js.map +1 -1
- package/dist/conversationViewProps.d.ts.map +1 -1
- package/dist/conversationViewProps.js.map +1 -1
- package/dist/conversationWorkEntry.d.ts.map +1 -1
- package/dist/conversationWorkEntry.js.map +1 -1
- package/dist/credential-account.d.ts +4 -0
- package/dist/credential-account.d.ts.map +1 -0
- package/dist/credential-account.js +4 -0
- package/dist/credential-account.js.map +1 -0
- package/dist/dataPorts.gen.d.ts +306 -0
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/decision-card.d.ts.map +1 -1
- package/dist/decision-card.js.map +1 -1
- package/dist/decisions.d.ts.map +1 -1
- package/dist/decisions.js.map +1 -1
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js.map +1 -1
- package/dist/derivedState.d.ts.map +1 -1
- package/dist/derivedState.js.map +1 -1
- package/dist/diagnosticData.d.ts.map +1 -1
- package/dist/diagnosticData.js.map +1 -1
- package/dist/diff-rendering.d.ts +2 -0
- package/dist/diff-rendering.d.ts.map +1 -0
- package/dist/diff-rendering.js +2 -0
- package/dist/diff-rendering.js.map +1 -0
- package/dist/display-format.d.ts +5 -0
- package/dist/display-format.d.ts.map +1 -0
- package/dist/display-format.js +5 -0
- package/dist/display-format.js.map +1 -0
- package/dist/entity-names.d.ts.map +1 -1
- package/dist/entity-names.js.map +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/executor-mode.d.ts +2 -0
- package/dist/executor-mode.d.ts.map +1 -0
- package/dist/executor-mode.js +2 -0
- package/dist/executor-mode.js.map +1 -0
- package/dist/executor.d.ts +17 -1
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js.map +1 -1
- package/dist/executorCapabilities.d.ts.map +1 -1
- package/dist/executorCapabilities.js.map +1 -1
- package/dist/executorCard.d.ts +6 -0
- package/dist/executorCard.d.ts.map +1 -1
- package/dist/executorCard.js.map +1 -1
- package/dist/executorCommandArgv.d.ts.map +1 -1
- package/dist/executorCommandArgv.js.map +1 -1
- package/dist/executorEffective.d.ts.map +1 -1
- package/dist/executorEffective.js.map +1 -1
- package/dist/executorErrors.d.ts.map +1 -1
- package/dist/executorErrors.js.map +1 -1
- package/dist/executorEvents.d.ts.map +1 -1
- package/dist/executorEvents.js.map +1 -1
- package/dist/executorModelOptions.d.ts.map +1 -1
- package/dist/executorModelOptions.js.map +1 -1
- package/dist/executorProcesses.d.ts.map +1 -1
- package/dist/executorProcesses.js.map +1 -1
- package/dist/executorSession.d.ts +8 -2
- package/dist/executorSession.d.ts.map +1 -1
- package/dist/executorSession.js.map +1 -1
- package/dist/executorSpawn.d.ts +5 -4
- package/dist/executorSpawn.d.ts.map +1 -1
- package/dist/executorSpawn.js +20 -7
- package/dist/executorSpawn.js.map +1 -1
- package/dist/fetch-ports.d.ts +2 -0
- package/dist/fetch-ports.d.ts.map +1 -0
- package/dist/fetch-ports.js +2 -0
- package/dist/fetch-ports.js.map +1 -0
- package/dist/file-preview.d.ts.map +1 -1
- package/dist/file-preview.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inline-tag.d.ts.map +1 -1
- package/dist/inline-tag.js.map +1 -1
- package/dist/instance-config.d.ts +7 -0
- package/dist/instance-config.d.ts.map +1 -0
- package/dist/instance-config.js +7 -0
- package/dist/instance-config.js.map +1 -0
- package/dist/interval.d.ts.map +1 -1
- package/dist/interval.js.map +1 -1
- package/dist/jsonl.d.ts +6 -0
- package/dist/jsonl.d.ts.map +1 -0
- package/dist/jsonl.js +6 -0
- package/dist/jsonl.js.map +1 -0
- package/dist/keyedSubscribers.d.ts.map +1 -1
- package/dist/keyedSubscribers.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js.map +1 -1
- package/dist/model-picker.d.ts.map +1 -1
- package/dist/model-picker.js.map +1 -1
- package/dist/modelCatalogNotice.d.ts.map +1 -1
- package/dist/modelCatalogNotice.js.map +1 -1
- package/dist/modelChoice.d.ts.map +1 -1
- package/dist/modelChoice.js.map +1 -1
- package/dist/modelChoiceOptions.d.ts.map +1 -1
- package/dist/modelChoiceOptions.js.map +1 -1
- package/dist/modelChoiceTraits.d.ts.map +1 -1
- package/dist/modelChoiceTraits.js.map +1 -1
- package/dist/modelDisplayName.d.ts.map +1 -1
- package/dist/modelDisplayName.js.map +1 -1
- package/dist/pending-requests.d.ts.map +1 -1
- package/dist/pending-requests.js.map +1 -1
- package/dist/plugin-tools.d.ts.map +1 -1
- package/dist/plugin-tools.js.map +1 -1
- package/dist/pluginContextCommands.d.ts.map +1 -1
- package/dist/pluginContextCommands.js.map +1 -1
- package/dist/pluginContextProviders.d.ts.map +1 -1
- package/dist/pluginContextProviders.js.map +1 -1
- package/dist/pluginContextThreads.d.ts.map +1 -1
- package/dist/pluginContextThreads.js.map +1 -1
- package/dist/pluginContextWorkspace.d.ts.map +1 -1
- package/dist/pluginContextWorkspace.js.map +1 -1
- package/dist/process-operation.d.ts.map +1 -1
- package/dist/process-operation.js.map +1 -1
- package/dist/process-socket.d.ts.map +1 -1
- package/dist/process-socket.js.map +1 -1
- package/dist/process-stdin.d.ts.map +1 -1
- package/dist/process-stdin.js.map +1 -1
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js.map +1 -1
- package/dist/provider-settings.d.ts.map +1 -1
- package/dist/provider-settings.js.map +1 -1
- package/dist/providerInstanceSelection.d.ts.map +1 -1
- package/dist/providerInstanceSelection.js.map +1 -1
- package/dist/reasoningLevelFallback.d.ts.map +1 -1
- package/dist/reasoningLevelFallback.js.map +1 -1
- package/dist/runtime-maintenance.d.ts.map +1 -1
- package/dist/runtime-maintenance.js.map +1 -1
- package/dist/runtimes.d.ts.map +1 -1
- package/dist/runtimes.js.map +1 -1
- package/dist/selectAllCopy.d.ts.map +1 -1
- package/dist/selectAllCopy.js.map +1 -1
- package/dist/session-history.d.ts +6 -0
- package/dist/session-history.d.ts.map +1 -0
- package/dist/session-history.js +6 -0
- package/dist/session-history.js.map +1 -0
- package/dist/settings-actions.d.ts.map +1 -1
- package/dist/settings-actions.js.map +1 -1
- package/dist/settings-card-shape.d.ts.map +1 -1
- package/dist/settings-card-shape.js.map +1 -1
- package/dist/settings-card.d.ts.map +1 -1
- package/dist/settings-card.js.map +1 -1
- package/dist/settings-ui.d.ts.map +1 -1
- package/dist/settings-ui.js.map +1 -1
- package/dist/sign-in.d.ts.map +1 -1
- package/dist/sign-in.js.map +1 -1
- package/dist/slashCommands.d.ts.map +1 -1
- package/dist/slashCommands.js.map +1 -1
- package/dist/slots.d.ts.map +1 -1
- package/dist/slots.js.map +1 -1
- package/dist/source/_private/ycodium-attachment-kinds/chatAttachmentKinds.ts +105 -0
- package/dist/source/_private/ycodium-attachment-kinds/mediaKinds.ts +83 -0
- package/dist/source/_private/ycodium-composer-tokens/approvalFileChanges.ts +58 -0
- package/dist/source/_private/ycodium-composer-tokens/composerFileLink.ts +23 -0
- package/dist/source/_private/ycodium-composer-tokens/composerInlineTokens.ts +130 -0
- package/dist/source/_private/ycodium-composer-tokens/composerLogic.ts +251 -0
- package/dist/source/_private/ycodium-composer-tokens/composerMentionDrag.ts +98 -0
- package/dist/source/_private/ycodium-composer-tokens/composerPromptSegments.ts +222 -0
- package/dist/source/_private/ycodium-composer-tokens/composerTrigger.ts +64 -0
- package/dist/source/_private/ycodium-composer-tokens/contextWindowFormat.ts +16 -0
- package/dist/source/_private/ycodium-composer-tokens/diffCount.ts +14 -0
- package/dist/source/_private/ycodium-composer-tokens/pendingUserInput.ts +256 -0
- package/dist/source/_private/ycodium-composer-tokens/promptContextBlocks.ts +179 -0
- package/dist/source/_private/ycodium-composer-tokens/proposedPlan.ts +134 -0
- package/dist/source/_private/ycodium-composer-tokens/providerSkillSearch.ts +105 -0
- package/dist/source/_private/ycodium-composer-tokens/providerSkills.ts +86 -0
- package/dist/source/_private/ycodium-composer-tokens/queueEntry.ts +49 -0
- package/dist/source/_private/ycodium-composer-tokens/reviewCommentBlocks.ts +177 -0
- package/dist/source/_private/ycodium-composer-tokens/searchRanking.ts +192 -0
- package/dist/source/_private/ycodium-composer-tokens/skillTokens.ts +192 -0
- package/dist/source/_private/ycodium-composer-tokens/slashMenu.ts +293 -0
- package/dist/source/_private/ycodium-composer-tokens/userInputOptionText.ts +51 -0
- package/dist/source/_private/ycodium-credential-account/credentialAccount.ts +83 -0
- package/dist/source/_private/ycodium-credential-account/quotaJson.ts +25 -0
- package/dist/source/_private/ycodium-credential-account/quotaRequest.ts +79 -0
- package/dist/source/_private/ycodium-day-format/dayFormat.ts +57 -0
- package/dist/source/_private/ycodium-day-format/timestampFormat.ts +165 -0
- package/dist/source/_private/ycodium-decision-order/decisionOrder.ts +54 -0
- package/dist/source/_private/ycodium-diff-format/diffRendering.ts +229 -0
- package/dist/source/_private/ycodium-duration-format/durationFormat.ts +60 -0
- package/dist/source/_private/ycodium-executor-common/catalogModel.ts +40 -0
- package/dist/source/_private/ycodium-executor-common/eventTypes.ts +97 -0
- package/dist/source/_private/ycodium-executor-common/modelSelection.ts +24 -0
- package/dist/source/_private/ycodium-executor-common/nodeStreams.ts +212 -0
- package/dist/source/_private/ycodium-executor-common/raceAbort.ts +25 -0
- package/dist/source/_private/ycodium-executor-common/reasoningLevelFallback.ts +28 -0
- package/dist/source/_private/ycodium-executor-common/stderrTail.ts +27 -0
- package/dist/source/_private/ycodium-executor-common/toolPresentation.ts +268 -0
- package/dist/source/_private/ycodium-fetch-ports/fetchPorts.ts +84 -0
- package/dist/source/_private/ycodium-fetch-ports/netFault.ts +30 -0
- package/dist/source/_private/ycodium-full-access-mode/fullAccessNativeMode.ts +32 -0
- package/dist/source/_private/ycodium-instance-config/homePath.ts +140 -0
- package/dist/source/_private/ycodium-instance-config/instanceConfig.ts +149 -0
- package/dist/source/_private/ycodium-instance-config/launchArgs.ts +60 -0
- package/dist/source/_private/ycodium-instance-config/probeProcess.ts +89 -0
- package/dist/source/_private/ycodium-instance-config/programHomeSchema.ts +74 -0
- package/dist/source/_private/ycodium-instance-config/tomlScalar.ts +10 -0
- package/dist/source/_private/ycodium-jsonl-stream/appendedJsonl.ts +222 -0
- package/dist/source/_private/ycodium-jsonl-stream/claudeSessions.ts +263 -0
- package/dist/source/_private/ycodium-jsonl-stream/codexSessions.ts +254 -0
- package/dist/source/_private/ycodium-jsonl-stream/history.ts +492 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyErrors.ts +6 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyFile.ts +139 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyRecord.ts +180 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyWaiting.ts +140 -0
- package/dist/source/_private/ycodium-jsonl-stream/jsonObjectLine.ts +15 -0
- package/dist/source/_private/ycodium-jsonl-stream/jsonlStream.ts +650 -0
- package/dist/source/_private/ycodium-jsonl-stream/scanCache.ts +163 -0
- package/dist/source/_private/ycodium-jsonl-stream/sessionDirectory.ts +39 -0
- package/dist/source/_private/ycodium-jsonl-stream/sessionTranscript.ts +136 -0
- package/dist/source/_private/ycodium-jsonl-stream/usageFields.ts +13 -0
- package/dist/source/_private/ycodium-markdown-fence/markdownFence.ts +28 -0
- package/dist/source/_private/ycodium-source-control/pullRequestScope.ts +35 -0
- package/dist/source/_private/ycodium-sse-stream/sseStream.ts +118 -0
- package/dist/source/_private/ycodium-system-text/memberInstructions.ts +24 -0
- package/dist/source/_private/ycodium-system-text/systemText.ts +356 -0
- package/dist/source/_private/ycodium-system-text/threadPreset.ts +35 -0
- package/dist/source/_private/ycodium-text-generation/branchName.ts +29 -0
- package/dist/source/_private/ycodium-text-generation/prompts.ts +342 -0
- package/dist/source/_private/ycodium-text-generation/sanitize.ts +125 -0
- package/dist/source/_private/ycodium-text-generation/structuredTextGeneration.ts +237 -0
- package/dist/source/_private/ycodium-tool-label/toolLabel.ts +287 -0
- package/dist/source/_private/ycodium-ui-hooks/DiffStatCounts.tsx +76 -0
- package/dist/source/_private/ycodium-ui-hooks/ProviderSignInChallenge.tsx +115 -0
- package/dist/source/_private/ycodium-ui-hooks/RenderErrorBoundary.tsx +34 -0
- package/dist/source/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.tsx +63 -0
- package/dist/source/_private/ycodium-ui-hooks/SkillInlineText.tsx +28 -0
- package/dist/source/_private/ycodium-ui-hooks/bundleStyle.ts +52 -0
- package/dist/source/_private/ycodium-ui-hooks/catalogKeys.ts +11 -0
- package/dist/source/_private/ycodium-ui-hooks/clipboard.ts +176 -0
- package/dist/source/_private/ycodium-ui-hooks/hostControls.ts +43 -0
- package/dist/source/_private/ycodium-ui-hooks/inlineChips.tsx +114 -0
- package/dist/source/_private/ycodium-ui-hooks/notifyMessages.ts +36 -0
- package/dist/source/_private/ycodium-ui-hooks/presenterInputState.ts +341 -0
- package/dist/source/_private/ycodium-ui-hooks/processRowHeader.ts +7 -0
- package/dist/source/_private/ycodium-ui-hooks/timelineDisclosure.ts +98 -0
- package/dist/source/_private/ycodium-ui-hooks/useMediaQuery.ts +87 -0
- package/dist/source/_private/ycodium-ui-hooks/workEntryIcons.ts +99 -0
- package/dist/source/_private/ycodium-workspace-path/directoryScope.ts +34 -0
- package/dist/source/_private/ycodium-workspace-path/workspacePath.ts +110 -0
- package/dist/source/cache.ts +55 -0
- package/dist/source/capabilityPorts.ts +272 -0
- package/dist/source/cli.ts +69 -0
- package/dist/source/commands.ts +208 -0
- package/dist/source/communication-view.ts +107 -0
- package/dist/source/communication.ts +26 -0
- package/dist/source/composer-control.ts +16 -0
- package/dist/source/composer.ts +108 -0
- package/dist/source/conversation-queue.ts +165 -0
- package/dist/source/conversation-view.ts +49 -0
- package/dist/source/conversation.ts +700 -0
- package/dist/source/conversationAttachments.ts +139 -0
- package/dist/source/conversationBase.ts +128 -0
- package/dist/source/conversationComposerApi.ts +339 -0
- package/dist/source/conversationComposerEnvironment.ts +76 -0
- package/dist/source/conversationComposerHandle.ts +89 -0
- package/dist/source/conversationComposerParts.ts +10 -0
- package/dist/source/conversationDerive.ts +252 -0
- package/dist/source/conversationDrafts.ts +281 -0
- package/dist/source/conversationForks.ts +40 -0
- package/dist/source/conversationHostModels.ts +467 -0
- package/dist/source/conversationLoadFailure.ts +9 -0
- package/dist/source/conversationMemberMentions.ts +63 -0
- package/dist/source/conversationMessageLinks.ts +153 -0
- package/dist/source/conversationMessageMemory.ts +45 -0
- package/dist/source/conversationPresets.ts +15 -0
- package/dist/source/conversationRows.ts +132 -0
- package/dist/source/conversationSessionMessage.ts +18 -0
- package/dist/source/conversationSkills.ts +26 -0
- package/dist/source/conversationTrajectory.ts +116 -0
- package/dist/source/conversationTranscript.ts +33 -0
- package/dist/source/conversationTurnSummaries.ts +57 -0
- package/dist/source/conversationViewProps.ts +486 -0
- package/dist/source/conversationWorkEntry.ts +104 -0
- package/dist/source/credential-account.ts +18 -0
- package/dist/source/dataPorts.gen.ts +2207 -0
- package/dist/source/decision-card.ts +87 -0
- package/dist/source/decisions.ts +43 -0
- package/dist/source/definition.ts +28 -0
- package/dist/source/derivedState.ts +55 -0
- package/dist/source/diagnosticData.ts +238 -0
- package/dist/source/diff-rendering.ts +6 -0
- package/dist/source/display-format.ts +14 -0
- package/dist/source/entity-names.ts +73 -0
- package/dist/source/events.ts +326 -0
- package/dist/source/executor-mode.ts +1 -0
- package/dist/source/executor.ts +623 -0
- package/dist/source/executorCapabilities.ts +89 -0
- package/dist/source/executorCard.ts +426 -0
- package/dist/source/executorCommandArgv.ts +114 -0
- package/dist/source/executorEffective.ts +99 -0
- package/dist/source/executorErrors.ts +73 -0
- package/dist/source/executorEvents.ts +258 -0
- package/dist/source/executorModelOptions.ts +179 -0
- package/dist/source/executorProcesses.ts +43 -0
- package/dist/source/executorSession.ts +508 -0
- package/dist/source/executorSpawn.ts +141 -0
- package/dist/source/fetch-ports.ts +1 -0
- package/dist/source/file-preview.ts +32 -0
- package/dist/source/index.ts +416 -0
- package/dist/source/inline-tag.ts +27 -0
- package/dist/source/instance-config.ts +31 -0
- package/dist/source/interval.ts +32 -0
- package/dist/source/jsonl.ts +21 -0
- package/dist/source/keyedSubscribers.ts +55 -0
- package/dist/source/logger.ts +16 -0
- package/dist/source/messages.ts +27 -0
- package/dist/source/model-picker.ts +82 -0
- package/dist/source/modelCatalogNotice.ts +34 -0
- package/dist/source/modelChoice.ts +371 -0
- package/dist/source/modelChoiceOptions.ts +309 -0
- package/dist/source/modelChoiceTraits.ts +133 -0
- package/dist/source/modelDisplayName.ts +42 -0
- package/dist/source/pending-requests.ts +56 -0
- package/dist/source/plugin-tools.ts +181 -0
- package/dist/source/pluginContextCommands.ts +224 -0
- package/dist/source/pluginContextProviders.ts +136 -0
- package/dist/source/pluginContextThreads.ts +83 -0
- package/dist/source/pluginContextWorkspace.ts +74 -0
- package/dist/source/process-operation.ts +291 -0
- package/dist/source/process-socket.ts +371 -0
- package/dist/source/process-stdin.ts +214 -0
- package/dist/source/projects.ts +31 -0
- package/dist/source/provider-settings.ts +343 -0
- package/dist/source/providerInstanceSelection.ts +72 -0
- package/dist/source/reasoningLevelFallback.ts +13 -0
- package/dist/source/runtime-maintenance.ts +307 -0
- package/dist/source/runtimes.ts +14 -0
- package/dist/source/selectAllCopy.ts +12 -0
- package/dist/source/session-history.ts +45 -0
- package/dist/source/settings-actions.ts +91 -0
- package/dist/source/settings-card-shape.ts +229 -0
- package/dist/source/settings-card.ts +311 -0
- package/dist/source/settings-ui.ts +48 -0
- package/dist/source/sign-in.ts +52 -0
- package/dist/source/slashCommands.ts +36 -0
- package/dist/source/slots.ts +243 -0
- package/dist/source/source-control.ts +5 -0
- package/dist/source/sse.ts +1 -0
- package/dist/source/system-text.ts +18 -0
- package/dist/source/teamView.ts +67 -0
- package/dist/source/testing.ts +203 -0
- package/dist/source/text-generation.ts +5 -0
- package/dist/source/threadAnnotation.ts +12 -0
- package/dist/source/threads.ts +77 -0
- package/dist/source/timeline-process.ts +87 -0
- package/dist/source/timeline-row-error.ts +14 -0
- package/dist/source/tool-display.ts +130 -0
- package/dist/source/traits-picker.ts +84 -0
- package/dist/source/ui-bridge-version.ts +64 -0
- package/dist/source/ui-hooks.ts +26 -0
- package/dist/source/ui-i18n.ts +1 -0
- package/dist/source/ui-media-query.ts +1 -0
- package/dist/source/ui-presenter-state.ts +6 -0
- package/dist/source/ui.ts +671 -0
- package/dist/source/uiHostCapabilities.ts +85 -0
- package/dist/source/uiMachineAdmission.ts +21 -0
- package/dist/source/uiSessionProjections.ts +19 -0
- package/dist/source/usage.ts +225 -0
- package/dist/source/version.ts +30 -0
- package/dist/source/workspace-path.ts +2 -0
- package/dist/source-control.d.ts +3 -0
- package/dist/source-control.d.ts.map +1 -0
- package/dist/source-control.js +3 -0
- package/dist/source-control.js.map +1 -0
- package/dist/sse.d.ts +2 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +2 -0
- package/dist/sse.js.map +1 -0
- package/dist/system-text.d.ts +4 -0
- package/dist/system-text.d.ts.map +1 -0
- package/dist/system-text.js +4 -0
- package/dist/system-text.js.map +1 -0
- package/dist/teamView.d.ts.map +1 -1
- package/dist/teamView.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/text-generation.d.ts +3 -0
- package/dist/text-generation.d.ts.map +1 -0
- package/dist/text-generation.js +3 -0
- package/dist/text-generation.js.map +1 -0
- package/dist/threadAnnotation.d.ts.map +1 -1
- package/dist/threadAnnotation.js.map +1 -1
- package/dist/threads.d.ts.map +1 -1
- package/dist/threads.js.map +1 -1
- package/dist/timeline-process.d.ts +32 -0
- package/dist/timeline-process.d.ts.map +1 -1
- package/dist/timeline-process.js.map +1 -1
- package/dist/timeline-row-error.d.ts.map +1 -1
- package/dist/timeline-row-error.js.map +1 -1
- package/dist/tool-display.d.ts.map +1 -1
- package/dist/tool-display.js.map +1 -1
- package/dist/traits-picker.d.ts.map +1 -1
- package/dist/traits-picker.js.map +1 -1
- package/dist/ui-bridge-version.d.ts.map +1 -1
- package/dist/ui-bridge-version.js.map +1 -1
- package/dist/ui-hooks.d.ts +14 -0
- package/dist/ui-hooks.d.ts.map +1 -0
- package/dist/ui-hooks.js +14 -0
- package/dist/ui-hooks.js.map +1 -0
- package/dist/ui-i18n.d.ts +2 -0
- package/dist/ui-i18n.d.ts.map +1 -0
- package/dist/ui-i18n.js +2 -0
- package/dist/ui-i18n.js.map +1 -0
- package/dist/ui-media-query.d.ts +2 -0
- package/dist/ui-media-query.d.ts.map +1 -0
- package/dist/ui-media-query.js +2 -0
- package/dist/ui-media-query.js.map +1 -0
- package/dist/ui-presenter-state.d.ts +2 -0
- package/dist/ui-presenter-state.d.ts.map +1 -0
- package/dist/ui-presenter-state.js +2 -0
- package/dist/ui-presenter-state.js.map +1 -0
- package/dist/ui.d.ts +2 -2
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/uiHostCapabilities.d.ts.map +1 -1
- package/dist/uiHostCapabilities.js.map +1 -1
- package/dist/uiMachineAdmission.d.ts.map +1 -1
- package/dist/uiMachineAdmission.js.map +1 -1
- package/dist/uiSessionProjections.d.ts.map +1 -1
- package/dist/uiSessionProjections.js.map +1 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/workspace-path.d.ts +3 -0
- package/dist/workspace-path.d.ts.map +1 -0
- package/dist/workspace-path.js +3 -0
- package/dist/workspace-path.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ConversationComposerImageAttachment,
|
|
3
|
+
ConversationComposerModelStatus,
|
|
4
|
+
ConversationElementContextDraft,
|
|
5
|
+
ConversationReviewCommentContext,
|
|
6
|
+
ConversationTerminalContextDraft,
|
|
7
|
+
ConversationTerminalContextSelection,
|
|
8
|
+
} from "./conversationDrafts.ts";
|
|
9
|
+
import type {
|
|
10
|
+
ConversationModelSelection,
|
|
11
|
+
ConversationBrowserAnnotationPayload,
|
|
12
|
+
ConversationProviderDriverKind,
|
|
13
|
+
ConversationServerProviderModel,
|
|
14
|
+
} from "./conversationHostModels.ts";
|
|
15
|
+
|
|
16
|
+
export interface ConversationComposerHandle {
|
|
17
|
+
focusAtEnd(): void;
|
|
18
|
+
focusAt(cursor: number): void;
|
|
19
|
+
addDroppedFiles(files: File[]): void;
|
|
20
|
+
/** 拖入的文件夹:能解析出本机路径就插成路径引用,否则提示。宿主没接线时可以不调用。 */
|
|
21
|
+
addDroppedFolders?(folders: File[]): void;
|
|
22
|
+
insertTextAtEnd(text: string, options?: { ensureLeadingBoundary?: boolean }): boolean;
|
|
23
|
+
toggleModelPicker(): void;
|
|
24
|
+
/** 快捷键换权限档:座位画什么就轮什么(这只手自己的档,或宿主四档)。 */
|
|
25
|
+
cyclePermissionMode(direction: 1 | -1): void;
|
|
26
|
+
/**
|
|
27
|
+
* 这次发送的身份:插件动作 + 正文。
|
|
28
|
+
*
|
|
29
|
+
* **只给「等一个异步操作回来后,确认用户没改主意」用。** 发送时要先问插件把正文
|
|
30
|
+
* 准备好,那是一次往返;回来时用户可能已经换了插件动作或改了字,这两样任一变了
|
|
31
|
+
* 就得丢弃这次发送。
|
|
32
|
+
*
|
|
33
|
+
* 它是命令式的(读此刻真值),不能换成订阅——订阅拿到的是最后推送过的值,在
|
|
34
|
+
* React 还没重渲染时会是旧的,这个防护就废了。
|
|
35
|
+
*
|
|
36
|
+
* 要防的东西变多(比如模型也不许换)就往这里加字段,别回头去读整个发送上下文:
|
|
37
|
+
* 那样谁都能在 await 之后读任意状态,没人说得清哪些是真需要的。
|
|
38
|
+
*/
|
|
39
|
+
readSendIdentity(): { prompt: string };
|
|
40
|
+
readSnapshot(): {
|
|
41
|
+
value: string;
|
|
42
|
+
cursor: number;
|
|
43
|
+
expandedCursor: number;
|
|
44
|
+
terminalContextIds: string[];
|
|
45
|
+
};
|
|
46
|
+
/** 外部改写 prompt(如 onSend 后)之后重置光标 / 触发 / 高亮。 */
|
|
47
|
+
resetCursorState(options?: { cursor?: number; prompt?: string; detectTrigger?: boolean }): void;
|
|
48
|
+
/** 从终端抽屉插入一段终端上下文。 */
|
|
49
|
+
addTerminalContext(selection: ConversationTerminalContextSelection): void;
|
|
50
|
+
/** 发送前读取 composer 的完整选择状态。 */
|
|
51
|
+
getSendContext(): {
|
|
52
|
+
prompt: string;
|
|
53
|
+
slashCommand?: { pluginId: string; name: string } | undefined;
|
|
54
|
+
slashSources?:
|
|
55
|
+
| {
|
|
56
|
+
readonly builtIns: readonly string[];
|
|
57
|
+
readonly skills: readonly {
|
|
58
|
+
name: string;
|
|
59
|
+
path: string;
|
|
60
|
+
enabled: boolean;
|
|
61
|
+
userInvocable?: boolean | undefined;
|
|
62
|
+
}[];
|
|
63
|
+
readonly commands: readonly { name: string }[];
|
|
64
|
+
}
|
|
65
|
+
| undefined;
|
|
66
|
+
images: ConversationComposerImageAttachment[];
|
|
67
|
+
terminalContexts: ConversationTerminalContextDraft[];
|
|
68
|
+
elementContexts: ConversationElementContextDraft[];
|
|
69
|
+
browserAnnotations: ConversationBrowserAnnotationPayload[];
|
|
70
|
+
reviewComments: ConversationReviewCommentContext[];
|
|
71
|
+
selectedModelOptionsForDispatch: unknown;
|
|
72
|
+
selectedModelSelection: ConversationModelSelection;
|
|
73
|
+
selectedNativeModeId?: string;
|
|
74
|
+
providerAvailable: boolean;
|
|
75
|
+
selectedProvider: ConversationProviderDriverKind;
|
|
76
|
+
selectedModel: string;
|
|
77
|
+
/** 与输入区座位、发送闸同一处结论。不是 `known` 就别发;`probing` / `missing` 时 `selectedModel` 是空串。 */
|
|
78
|
+
selectedModelStatus: ConversationComposerModelStatus;
|
|
79
|
+
selectedProviderModels: ReadonlyArray<ConversationServerProviderModel>;
|
|
80
|
+
};
|
|
81
|
+
/** provider turn 开始前校验合成输入。 */
|
|
82
|
+
validateProviderInput(providerInput: string): boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 同步发送读的那份上下文。子组件把读函数推到宿主的 ref 上,宿主不要经
|
|
87
|
+
* imperative handle 反问。await 之后核对用户有没有改主意,仍用 `readSendIdentity`。
|
|
88
|
+
*/
|
|
89
|
+
export type ConversationComposerSendContextReader = ConversationComposerHandle["getSendContext"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 输入框 `!` 命令模式用的会话终端,见 `ConversationHostData.useShellCommand`。 */
|
|
2
|
+
export interface ConversationShellCommand {
|
|
3
|
+
/** 现在为什么不能运行,给用户看的一句话;null 时可以运行。 */
|
|
4
|
+
readonly unavailableReason: string | null;
|
|
5
|
+
/**
|
|
6
|
+
* 在会话终端里运行一行命令(已去掉开头的 `!`),写进终端后记成会话活动,所有设备可见。
|
|
7
|
+
* 写进终端就返回 true,记录失败由宿主提示;没写成返回 false,原因宿主已经说过。
|
|
8
|
+
*/
|
|
9
|
+
run(command: string): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主派生函数:纯函数,宿主实现;插件带本地 UI 状态调用。
|
|
3
|
+
* 类型从 `conversation.ts` 再导出,插件照常从 `@ycodium-ai/plugin-api/conversation` 引。
|
|
4
|
+
*
|
|
5
|
+
* @module @ycodium-ai/plugin-api/conversationDerive
|
|
6
|
+
*/
|
|
7
|
+
import type {
|
|
8
|
+
ConversationChatMessage,
|
|
9
|
+
ConversationMessageSpeaker,
|
|
10
|
+
ConversationModelBadge,
|
|
11
|
+
ConversationThreadActivity,
|
|
12
|
+
ConversationTimelineEntry,
|
|
13
|
+
} from "./conversationBase.ts";
|
|
14
|
+
import type { ConversationModelSelection } from "./conversationHostModels.ts";
|
|
15
|
+
import type { ThreadsHistoryOutput } from "./dataPorts.gen.ts";
|
|
16
|
+
import type { ConversationMessageLinkText } from "./conversationMessageLinks.ts";
|
|
17
|
+
import type { ConversationTimelineRow, ConversationTurnGroup } from "./conversationRows.ts";
|
|
18
|
+
import type { ConversationWorkEntry } from "./conversationWorkEntry.ts";
|
|
19
|
+
|
|
20
|
+
export interface ConversationRowsDeriveInput {
|
|
21
|
+
readonly activities: readonly ConversationThreadActivity[];
|
|
22
|
+
readonly timelineEntries: readonly ConversationTimelineEntry[];
|
|
23
|
+
readonly latestTurn: ConversationLatestTurn | null;
|
|
24
|
+
/** 已投影的逐轮起止与等待区间;原样交回宿主页脚派生,不在插件重算用时。 */
|
|
25
|
+
readonly turnSummaries?: ThreadsHistoryOutput["thread"]["turnSummaries"];
|
|
26
|
+
readonly runningTurnId: string | null;
|
|
27
|
+
/** 插件本地展开态:用户显式展开 + 本会话自动展开(含中断保留)。 */
|
|
28
|
+
readonly expandedTurnIds: ReadonlySet<string>;
|
|
29
|
+
readonly isWorking: boolean;
|
|
30
|
+
readonly activeTurnStartedAt: string | null;
|
|
31
|
+
/** 续跑检查进行中:在最后一段末尾画一行。旧插件不传。 */
|
|
32
|
+
readonly continuationCheck?: {
|
|
33
|
+
readonly pluginIds: readonly string[];
|
|
34
|
+
readonly startedAt: string;
|
|
35
|
+
} | null;
|
|
36
|
+
readonly resolveModelBadge:
|
|
37
|
+
| ((selection: ConversationModelSelection | undefined) => ConversationModelBadge | null)
|
|
38
|
+
| undefined;
|
|
39
|
+
readonly pendingModelSelection: ConversationModelSelection | null | undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 宿主已知轮次的行缓存键(插件持有缓存,键值对插件不透明)。 */
|
|
43
|
+
export type ConversationKnownTurns = ReadonlyMap<string, ConversationLatestTurn>;
|
|
44
|
+
|
|
45
|
+
export interface ConversationDerivedRows {
|
|
46
|
+
readonly rows: ConversationTimelineRow[];
|
|
47
|
+
readonly turnGroups: readonly ConversationTurnGroup[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 最新一轮的派生输入(宿主 `TimelineLatestTurn` 的结构子集)。 */
|
|
51
|
+
export interface ConversationLatestTurn {
|
|
52
|
+
readonly turnId: string;
|
|
53
|
+
readonly state: string;
|
|
54
|
+
readonly requestedAt?: string | undefined;
|
|
55
|
+
readonly startedAt: string | null;
|
|
56
|
+
readonly completedAt: string | null;
|
|
57
|
+
readonly userMessageId: string | null;
|
|
58
|
+
readonly assistantMessageId: string | null;
|
|
59
|
+
readonly modelSelection?: ConversationModelSelection | undefined;
|
|
60
|
+
readonly waitSpans?: unknown;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** 行派生缓存。`deriveGroups` 是纯函数;缓存身份归插件,跨派生复用行对象。 */
|
|
64
|
+
export interface ConversationRowsCache {
|
|
65
|
+
deriveGroups(input: ConversationRowsDeriveInput): ConversationDerivedRows;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** 通知种类:取自生成的会话读输出,契约加种类时跟着生成,不在这里另写一份。 */
|
|
69
|
+
type ThreadNotificationData = NonNullable<
|
|
70
|
+
ThreadsHistoryOutput["thread"]["pendingNotifications"]
|
|
71
|
+
>[number]["notification"];
|
|
72
|
+
type ThreadNotificationKind = ThreadNotificationData["kind"];
|
|
73
|
+
|
|
74
|
+
interface ConversationParsedNotificationFields {
|
|
75
|
+
readonly childThreadId?: string;
|
|
76
|
+
readonly sourceThreadId?: string;
|
|
77
|
+
readonly title: string;
|
|
78
|
+
readonly requestId: string | null;
|
|
79
|
+
readonly summary: string;
|
|
80
|
+
/** 缺席时 summary 是旧通知原文,不能猜结论;有值时只翻译结论,summary 保留原文。 */
|
|
81
|
+
readonly resolution?: ThreadNotificationData["resolution"];
|
|
82
|
+
/** 子会话回报落成的通信记录号:宿主按记录在时间线上画卡片,插件不再画这一块。旧通知缺席。 */
|
|
83
|
+
readonly recordId?: string;
|
|
84
|
+
/** 回报已落为发言,由宿主按发言画卡片,插件不重复显示通知块。 */
|
|
85
|
+
readonly postId?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** 子会话种类保证有跳转目标;通用通知可以没有来源会话。 */
|
|
89
|
+
export type ConversationParsedSystemNotification = ConversationParsedNotificationFields &
|
|
90
|
+
(
|
|
91
|
+
| {
|
|
92
|
+
readonly kind: Extract<ThreadNotificationData, { readonly childThreadId: string }>["kind"];
|
|
93
|
+
readonly childThreadId: string;
|
|
94
|
+
}
|
|
95
|
+
| {
|
|
96
|
+
readonly kind: Exclude<
|
|
97
|
+
ThreadNotificationKind,
|
|
98
|
+
Extract<ThreadNotificationData, { readonly childThreadId: string }>["kind"]
|
|
99
|
+
>;
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
/** `parseThreadHandoverText` 的结果(宿主 `ParsedThreadHandover` 的子集)。 */
|
|
104
|
+
export interface ConversationParsedThreadHandover {
|
|
105
|
+
readonly sourceThreadId: string;
|
|
106
|
+
readonly includedTurns: number;
|
|
107
|
+
readonly body: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** `parsePresetPrefixText` 的结果(宿主 `ParsedPresetPrefix` 的子集)。 */
|
|
111
|
+
export interface ConversationParsedPresetPrefix {
|
|
112
|
+
readonly presetId: string;
|
|
113
|
+
readonly prefix: string;
|
|
114
|
+
/** 前缀块后面用户自己写的那半,可能为空。 */
|
|
115
|
+
readonly body: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** 卡住提示的可读子集(宿主 `TurnStallState` 的结构子集)。 */
|
|
119
|
+
export interface ConversationTurnStall {
|
|
120
|
+
readonly reason: "childThread" | "tool" | "approval" | "userInput" | "model";
|
|
121
|
+
/** 最后一次有动静的时刻,插件按它自己走秒。 */
|
|
122
|
+
readonly since: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** 滚动落点:视口顶对应行的 id 与相对行顶的偏移;负值保留行前留白。 */
|
|
126
|
+
export interface ConversationScrollAnchor {
|
|
127
|
+
readonly rowId: string;
|
|
128
|
+
readonly offsetPx: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** 工具行的状态点取值;非工具行为 null。 */
|
|
132
|
+
export type ConversationWorkEntryStatus = "success" | "failed" | "running" | null;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 一条工具调用按展示口径落在哪一类(权威定义;client-runtime 的 `ToolPresentationStatus` 引用它):
|
|
136
|
+
* 被拒(`declined`)与被停(`stopped`)各自单列,不算 `failed`。
|
|
137
|
+
*/
|
|
138
|
+
export type ConversationToolPresentationStatus =
|
|
139
|
+
| "running"
|
|
140
|
+
| "completed"
|
|
141
|
+
| "failed"
|
|
142
|
+
| "declined"
|
|
143
|
+
| "stopped"
|
|
144
|
+
| "unknown";
|
|
145
|
+
|
|
146
|
+
/** 工具组里「没有正常收尾」的三类;同时有几类时先看哪一类,由宿主的 `summarizeToolGroup` 定。 */
|
|
147
|
+
export type ConversationToolGroupIssueKind = Extract<
|
|
148
|
+
ConversationToolPresentationStatus,
|
|
149
|
+
"failed" | "declined" | "stopped"
|
|
150
|
+
>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 一组工具调用的异常汇总(宿主 `summarizeToolGroup` 的结果):各类计数,加上组里最该看的那一类
|
|
154
|
+
* 和它对应的那一条(失败,其次被拒,最后被停;没有异常则为 null)。按钮文案与跳转目标都读 `issue`。
|
|
155
|
+
*/
|
|
156
|
+
export interface ConversationToolGroupSummary {
|
|
157
|
+
readonly failedCount: number;
|
|
158
|
+
readonly declinedCount: number;
|
|
159
|
+
readonly stoppedCount: number;
|
|
160
|
+
readonly issue: {
|
|
161
|
+
readonly kind: ConversationToolGroupIssueKind;
|
|
162
|
+
readonly entry: ConversationWorkEntry;
|
|
163
|
+
} | null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** 折叠工具组按动作分类的口径(宿主 `ToolGroupAction`)。 */
|
|
167
|
+
export type ConversationToolGroupAction =
|
|
168
|
+
| "read"
|
|
169
|
+
| "edit"
|
|
170
|
+
| "command"
|
|
171
|
+
| "code-search"
|
|
172
|
+
| "search"
|
|
173
|
+
| "other";
|
|
174
|
+
|
|
175
|
+
export interface ConversationDeriveApi extends ConversationMessageLinkText {
|
|
176
|
+
/** 每个时间线实例建一份(插件侧 useRef 持有)。 */
|
|
177
|
+
createRowsCache(): ConversationRowsCache;
|
|
178
|
+
/** 滚动是否已到末尾的判定(保持与宿主一致的容差)。 */
|
|
179
|
+
resolveIsAtEnd(
|
|
180
|
+
state:
|
|
181
|
+
| {
|
|
182
|
+
isAtEnd?: boolean | undefined;
|
|
183
|
+
contentLength?: number | undefined;
|
|
184
|
+
scroll?: number | undefined;
|
|
185
|
+
scrollLength?: number | undefined;
|
|
186
|
+
}
|
|
187
|
+
| undefined,
|
|
188
|
+
endInset: number,
|
|
189
|
+
): boolean | undefined;
|
|
190
|
+
/** 合组锚翻译:tool-group 自锚 id → 组行 id。 */
|
|
191
|
+
resolveToolGroupRevealRowId(rows: readonly ConversationTimelineRow[], rowId: string): string;
|
|
192
|
+
/** 时间线上真正摊开的轮次:用户显式展开 + 本会话自动展开(含中断保留)。 */
|
|
193
|
+
resolveExpandedTurnIds(
|
|
194
|
+
persistedTurnIds: readonly string[],
|
|
195
|
+
autoExpandedTurnIds: ReadonlySet<string>,
|
|
196
|
+
): ReadonlySet<string>;
|
|
197
|
+
/** 系统通知 / 会话移交 / preset 前缀文案的解析(消息行按内容切换呈现)。 */
|
|
198
|
+
parseSystemNotificationText(text: string): ConversationParsedSystemNotification | null;
|
|
199
|
+
/** 这条通知有没有子会话可跳;收件方即来源方的种类没有。 */
|
|
200
|
+
notificationOpensChildThread(kind: ConversationParsedSystemNotification["kind"]): boolean;
|
|
201
|
+
parseThreadHandoverText(text: string): ConversationParsedThreadHandover | null;
|
|
202
|
+
parsePresetPrefixText(text: string): ConversationParsedPresetPrefix | null;
|
|
203
|
+
/** 这条用户消息是谁说的:气泡靠它分左右、写名字,插件不自己判断。 */
|
|
204
|
+
messageSpeaker(
|
|
205
|
+
message: Pick<ConversationChatMessage, "author" | "origin">,
|
|
206
|
+
selfUserId: string | null,
|
|
207
|
+
/** 没署名的人话算不算这个人的;缺省算。服务器把连接认成某个账号时传 false。 */
|
|
208
|
+
ownsUnsignedMessages?: boolean,
|
|
209
|
+
): ConversationMessageSpeaker;
|
|
210
|
+
/** 运行中计时:与收尾轮次同一只钟,等你处理的那段停表。`paused` 为真时不必再每秒重画。 */
|
|
211
|
+
workingClock(input: {
|
|
212
|
+
readonly startedAt: string;
|
|
213
|
+
readonly nowIso: string;
|
|
214
|
+
readonly waitSpans: Extract<ConversationTimelineRow, { kind: "working" }>["waitSpans"];
|
|
215
|
+
readonly runSegments: Extract<ConversationTimelineRow, { kind: "working" }>["runSegments"];
|
|
216
|
+
}): { readonly elapsedMs: number | null; readonly paused: boolean };
|
|
217
|
+
/** provider 重试提示文案。文案 key 归插件词表(providerRetry.*),宿主函数
|
|
218
|
+
* 只组模板参数。 */
|
|
219
|
+
providerRetryMessage(
|
|
220
|
+
state: unknown,
|
|
221
|
+
t: (key: string, options?: Record<string, unknown>) => string,
|
|
222
|
+
): string;
|
|
223
|
+
/** 助手消息复制按钮的可见性(流式中/空回复不画)。 */
|
|
224
|
+
resolveAssistantMessageCopyState(input: {
|
|
225
|
+
readonly text: string | null;
|
|
226
|
+
readonly showCopyButton: boolean;
|
|
227
|
+
readonly streaming: boolean;
|
|
228
|
+
}): { readonly text: string | null; readonly visible: boolean };
|
|
229
|
+
/** 助手正文是否保留原始换行(特定标记的正文按原样显示)。 */
|
|
230
|
+
shouldPreserveAssistantLineBreaks(text: string): boolean;
|
|
231
|
+
/** 思考/折叠回复的一行预览(与宿主同一条末行有效规则)。 */
|
|
232
|
+
reasoningPreviewText(text: string): string;
|
|
233
|
+
/** 工具行状态点(失败优先于进行中);非工具行为 null。 */
|
|
234
|
+
resolveWorkEntryStatus(entry: ConversationWorkEntry): ConversationWorkEntryStatus;
|
|
235
|
+
/** 这条工具记录落在哪一类(失败 / 被拒 / 被停各自单列);`failed` 才是红字、红点、失败计数。 */
|
|
236
|
+
toolPresentationStatus(entry: ConversationWorkEntry): ConversationToolPresentationStatus;
|
|
237
|
+
/** 一组工具调用的各类计数与最该看的那一条;工具组的计数、按钮文案、跳转目标都读它。 */
|
|
238
|
+
summarizeToolGroup(entries: readonly ConversationWorkEntry[]): ConversationToolGroupSummary;
|
|
239
|
+
/** 一组工具调用按动作分类(图标与计数)。 */
|
|
240
|
+
toolGroupAction(entry: ConversationWorkEntry): ConversationToolGroupAction;
|
|
241
|
+
/** 工具记录里的命令文本(结构化输入优先于回显)。 */
|
|
242
|
+
resolveToolCommand(entry: ConversationWorkEntry): string | undefined;
|
|
243
|
+
/** 参数 JSON 里的命令与 description 摘要。 */
|
|
244
|
+
parseToolCommandInput(
|
|
245
|
+
input: unknown,
|
|
246
|
+
): { readonly command?: string | undefined; readonly description?: string | undefined } | null;
|
|
247
|
+
/** 末条助手消息是否已完整落地(shell 与明细独立到达,流式半段不算)。 */
|
|
248
|
+
hasSettledAssistantMessage(
|
|
249
|
+
entries: readonly ConversationTimelineEntry[],
|
|
250
|
+
messageId: string | null,
|
|
251
|
+
): boolean;
|
|
252
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 草稿、stash 与上传:穿界的宿主 store 形状。
|
|
3
|
+
* 类型从 `conversation.ts` 再导出,插件照常从 `@ycodium-ai/plugin-api/conversation` 引。
|
|
4
|
+
*
|
|
5
|
+
* @module @ycodium-ai/plugin-api/conversationDrafts
|
|
6
|
+
*/
|
|
7
|
+
import type { ConversationPastedTextSource } from "./conversationAttachments.ts";
|
|
8
|
+
import type {
|
|
9
|
+
ConversationComposerThreadTarget,
|
|
10
|
+
ConversationModelChoice,
|
|
11
|
+
ConversationModelSelection,
|
|
12
|
+
ConversationBrowserAnnotationPayload,
|
|
13
|
+
ConversationProviderDriverKind,
|
|
14
|
+
ConversationProviderInstanceId,
|
|
15
|
+
ConversationProviderInteractionMode,
|
|
16
|
+
ConversationProviderOptionSelection,
|
|
17
|
+
ConversationRuntimeMode,
|
|
18
|
+
ConversationThreadId,
|
|
19
|
+
} from "./conversationHostModels.ts";
|
|
20
|
+
|
|
21
|
+
export interface ConversationComposerImageAttachment {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
mimeType: string;
|
|
25
|
+
sizeBytes: number;
|
|
26
|
+
/** 附件类型判定(可内联图片 or 上传文件);与宿主 ChatAttachment 同构。 */
|
|
27
|
+
type: "image" | "file";
|
|
28
|
+
previewUrl: string;
|
|
29
|
+
file: File;
|
|
30
|
+
source?: ConversationPastedTextSource | undefined;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ConversationPersistedComposerImageAttachment {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
mimeType: string;
|
|
38
|
+
sizeBytes: number;
|
|
39
|
+
dataUrl: string;
|
|
40
|
+
storageId?: string | undefined;
|
|
41
|
+
remote?: { environmentId: string; attachmentId: string } | undefined;
|
|
42
|
+
source?: ConversationPastedTextSource | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ConversationTerminalContextSelection {
|
|
46
|
+
terminalId: string;
|
|
47
|
+
terminalLabel: string;
|
|
48
|
+
lineStart: number;
|
|
49
|
+
lineEnd: number;
|
|
50
|
+
text: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ConversationTerminalContextDraft extends ConversationTerminalContextSelection {
|
|
54
|
+
id: string;
|
|
55
|
+
threadId: ConversationThreadId;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ConversationElementContextStackFrame {
|
|
60
|
+
functionName: string | null;
|
|
61
|
+
fileName: string | null;
|
|
62
|
+
lineNumber: number | null;
|
|
63
|
+
columnNumber: number | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ConversationElementContextSelection {
|
|
67
|
+
pageUrl: string;
|
|
68
|
+
pageTitle: string | null;
|
|
69
|
+
tagName: string;
|
|
70
|
+
selector: string | null;
|
|
71
|
+
htmlPreview: string;
|
|
72
|
+
componentName: string | null;
|
|
73
|
+
source: ConversationElementContextStackFrame | null;
|
|
74
|
+
styles: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ConversationElementContextDraft extends ConversationElementContextSelection {
|
|
78
|
+
id: string;
|
|
79
|
+
threadId: ConversationThreadId;
|
|
80
|
+
pickedAt: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ConversationReviewCommentContext {
|
|
84
|
+
readonly id: string;
|
|
85
|
+
readonly sectionId: string;
|
|
86
|
+
readonly sectionTitle: string;
|
|
87
|
+
readonly filePath: string;
|
|
88
|
+
readonly startIndex: number;
|
|
89
|
+
readonly endIndex: number;
|
|
90
|
+
readonly rangeLabel: string;
|
|
91
|
+
readonly text: string;
|
|
92
|
+
readonly diff: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface ConversationPromptStashEntry {
|
|
96
|
+
id: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
prompt: string;
|
|
99
|
+
attachments: ReadonlyArray<ConversationPersistedComposerImageAttachment>;
|
|
100
|
+
droppedImageNames: ReadonlyArray<string>;
|
|
101
|
+
unreadableImageNames?: ReadonlyArray<string> | undefined;
|
|
102
|
+
pendingImageCount?: number | undefined;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 上传失败的原因码,插件按码取自己的译文。`rejected` 时 `httpStatus` 带服务器回的状态码;
|
|
107
|
+
* 宿主以后可能加新码,不认识的码与没给码的旧宿主一样退回 `reason`(宿主的英文诊断串)。
|
|
108
|
+
*/
|
|
109
|
+
export type ConversationAttachmentUploadFailureCode =
|
|
110
|
+
| "start-failed"
|
|
111
|
+
| "not-connected"
|
|
112
|
+
| "rejected"
|
|
113
|
+
| "timed-out"
|
|
114
|
+
| "cancelled"
|
|
115
|
+
| "failed";
|
|
116
|
+
|
|
117
|
+
export type ConversationAttachmentUploadState =
|
|
118
|
+
| { status: "ready"; environmentId: string; attachmentId: string }
|
|
119
|
+
| { status: "uploading"; environmentId: string; progress: number; previous?: unknown }
|
|
120
|
+
| {
|
|
121
|
+
status: "failed";
|
|
122
|
+
environmentId: string;
|
|
123
|
+
reason: string;
|
|
124
|
+
code?: ConversationAttachmentUploadFailureCode;
|
|
125
|
+
httpStatus?: number;
|
|
126
|
+
attachmentId?: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** 宿主 `ComposerThreadDraftState` 的结构子集:一条会话输入框里的草稿。 */
|
|
130
|
+
export interface ConversationComposerThreadDraft {
|
|
131
|
+
prompt: string;
|
|
132
|
+
images: ConversationComposerImageAttachment[];
|
|
133
|
+
nonPersistedImageIds: string[];
|
|
134
|
+
persistedAttachments: ConversationPersistedComposerImageAttachment[];
|
|
135
|
+
terminalContexts: ConversationTerminalContextDraft[];
|
|
136
|
+
elementContexts: ConversationElementContextDraft[];
|
|
137
|
+
browserAnnotations: ConversationBrowserAnnotationPayload[];
|
|
138
|
+
reviewComments: ConversationReviewCommentContext[];
|
|
139
|
+
modelSelectionByProvider: Readonly<Record<string, ConversationModelSelection | undefined>>;
|
|
140
|
+
nativeModeByProvider?: Readonly<Record<string, string | null | undefined>> | undefined;
|
|
141
|
+
activeProvider: ConversationProviderInstanceId | null;
|
|
142
|
+
runtimeMode: ConversationRuntimeMode | null;
|
|
143
|
+
interactionMode: ConversationProviderInteractionMode | null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* 草稿字段 + store 的 action 面(zustand 的 state 与 action 同住一个对象;hook 经
|
|
147
|
+
* api.draft.useStore 穿界,插件只用它取 action)。
|
|
148
|
+
*/
|
|
149
|
+
export interface ConversationComposerDraftState extends ConversationComposerThreadDraft {
|
|
150
|
+
setPrompt(target: ConversationComposerThreadTarget, prompt: string): void;
|
|
151
|
+
setTerminalContexts(
|
|
152
|
+
target: ConversationComposerThreadTarget,
|
|
153
|
+
contexts: ConversationTerminalContextDraft[],
|
|
154
|
+
): void;
|
|
155
|
+
setProviderModelOptions(
|
|
156
|
+
target: ConversationComposerThreadTarget,
|
|
157
|
+
provider: ConversationProviderDriverKind,
|
|
158
|
+
nextProviderOptions: ReadonlyArray<ConversationProviderOptionSelection> | null | undefined,
|
|
159
|
+
options?: {
|
|
160
|
+
instanceId?: ConversationProviderInstanceId | null | undefined;
|
|
161
|
+
model?: string | null | undefined;
|
|
162
|
+
persistSticky?: boolean;
|
|
163
|
+
},
|
|
164
|
+
): void;
|
|
165
|
+
setNativeMode(
|
|
166
|
+
target: ConversationComposerThreadTarget,
|
|
167
|
+
instanceId: ConversationProviderInstanceId,
|
|
168
|
+
nativeModeId: string | null,
|
|
169
|
+
): void;
|
|
170
|
+
addImage(
|
|
171
|
+
target: ConversationComposerThreadTarget,
|
|
172
|
+
image: ConversationComposerImageAttachment,
|
|
173
|
+
): void;
|
|
174
|
+
addImages(
|
|
175
|
+
target: ConversationComposerThreadTarget,
|
|
176
|
+
images: ConversationComposerImageAttachment[],
|
|
177
|
+
): void;
|
|
178
|
+
removeImage(target: ConversationComposerThreadTarget, imageId: string): void;
|
|
179
|
+
insertTerminalContext(
|
|
180
|
+
target: ConversationComposerThreadTarget,
|
|
181
|
+
prompt: string,
|
|
182
|
+
context: ConversationTerminalContextDraft,
|
|
183
|
+
index: number,
|
|
184
|
+
): boolean;
|
|
185
|
+
removeTerminalContext(target: ConversationComposerThreadTarget, contextId: string): void;
|
|
186
|
+
removeElementContext(target: ConversationComposerThreadTarget, contextId: string): void;
|
|
187
|
+
removeBrowserAnnotation(target: ConversationComposerThreadTarget, annotationId: string): void;
|
|
188
|
+
removeReviewComment(target: ConversationComposerThreadTarget, commentId: string): void;
|
|
189
|
+
clearComposerPromptAndImages(target: ConversationComposerThreadTarget): void;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** 宿主 `useComposerDraftStore` 同形:zustand store hook 原样穿界。 */
|
|
193
|
+
export interface ConversationComposerDraftStoreHook {
|
|
194
|
+
<T>(selector: (state: ConversationComposerDraftState) => T): T;
|
|
195
|
+
getState(): ConversationComposerDraftState;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 输入区这只手现在拿不拿得出型号。宿主只在一处判(`resolveInstanceModelState`),
|
|
200
|
+
* 座位标签与发送闸都读这个结论,不要各自再判一次「有没有型号」。
|
|
201
|
+
*/
|
|
202
|
+
export type ConversationComposerModelStatus =
|
|
203
|
+
/** 有型号:`selectedModel` 就是它。 */
|
|
204
|
+
| "known"
|
|
205
|
+
/** 首探还在跑:清单不算数,等它落地,不要替这只手选一个。 */
|
|
206
|
+
| "probing"
|
|
207
|
+
/** 探测跑完了,这只手一个型号都没报。 */
|
|
208
|
+
| "missing"
|
|
209
|
+
/** 存着的型号确定用不了(探测已出结果、目录里没有它):`selectedModel` 仍是它,选择器标「不可用」,不许发。 */
|
|
210
|
+
| "unavailable";
|
|
211
|
+
|
|
212
|
+
export interface ConversationEffectiveComposerModelState {
|
|
213
|
+
/** `selectedModelStatus` 是 `probing` / `missing` 时为空串——不会回落到别的手或全局默认型号。 */
|
|
214
|
+
selectedModel: string;
|
|
215
|
+
selectedModelStatus: ConversationComposerModelStatus;
|
|
216
|
+
/**
|
|
217
|
+
* 宿主解析器对这只手的完整结论:列表、选中(含「未列出」「已隐藏」「未经确认」)、各档位的有效值、
|
|
218
|
+
* 派发值与提示。快照里没有这只手时为 null。输入区的档位控件与提示只读它,不再自己推。
|
|
219
|
+
*/
|
|
220
|
+
choice: ConversationModelChoice | null;
|
|
221
|
+
modelOptions: Readonly<
|
|
222
|
+
Record<string, ReadonlyArray<ConversationProviderOptionSelection> | undefined>
|
|
223
|
+
> | null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface ConversationPromptStashStoreState {
|
|
227
|
+
entries: ReadonlyArray<ConversationPromptStashEntry>;
|
|
228
|
+
stashEntry(entry: ConversationPromptStashEntry): {
|
|
229
|
+
evicted: ConversationPromptStashEntry | null;
|
|
230
|
+
written: boolean;
|
|
231
|
+
durable: boolean;
|
|
232
|
+
};
|
|
233
|
+
takeEntry(id: string): {
|
|
234
|
+
entry: ConversationPromptStashEntry | null;
|
|
235
|
+
durable: boolean;
|
|
236
|
+
};
|
|
237
|
+
finalizeEntryImages(
|
|
238
|
+
id: string,
|
|
239
|
+
images: {
|
|
240
|
+
attachments: ReadonlyArray<ConversationPersistedComposerImageAttachment>;
|
|
241
|
+
droppedImageNames: ReadonlyArray<string>;
|
|
242
|
+
unreadableImageNames: ReadonlyArray<string>;
|
|
243
|
+
},
|
|
244
|
+
): { attached: boolean; durable: boolean };
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface ConversationPromptStashStoreHook {
|
|
248
|
+
<T>(selector: (state: ConversationPromptStashStoreState) => T): T;
|
|
249
|
+
getState(): ConversationPromptStashStoreState;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface ConversationAttachmentUploadStoreState {
|
|
253
|
+
uploadsByImageId: Readonly<Record<string, ConversationAttachmentUploadState>>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface ConversationAttachmentUploadStoreHook {
|
|
257
|
+
<T>(selector: (state: ConversationAttachmentUploadStoreState) => T): T;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface ConversationCompressedStashImage {
|
|
261
|
+
mimeType: string;
|
|
262
|
+
sizeBytes: number;
|
|
263
|
+
dataUrl: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type ConversationCompressStashImageResult =
|
|
267
|
+
| { ok: true; image: ConversationCompressedStashImage }
|
|
268
|
+
| { ok: false; reason: "too-large" | "unreadable" };
|
|
269
|
+
|
|
270
|
+
export type ConversationAttachmentPreparationFailure =
|
|
271
|
+
| { ok: false; reason: "file-too-large" | "image-too-large"; maxBytes: number }
|
|
272
|
+
| { ok: false; reason: "unreadable" };
|
|
273
|
+
|
|
274
|
+
export type ConversationPrepareAttachmentFileResult =
|
|
275
|
+
| { ok: true; file: File; kind: "image" | "file" | "file-fallback" }
|
|
276
|
+
| ConversationAttachmentPreparationFailure;
|
|
277
|
+
|
|
278
|
+
export interface ConversationAttachmentPreparationError {
|
|
279
|
+
key: "attachments.tooLarge" | "attachments.imageTooLarge" | "attachments.unreadableImage";
|
|
280
|
+
values: { name: string; limit?: string };
|
|
281
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ConversationThreadTarget } from "./conversation.ts";
|
|
2
|
+
|
|
3
|
+
export interface ConversationForkThread extends ConversationThreadTarget {
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly createdAt: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** 只含宿主现有列表可见的分叉;旧宿主没有这个钩子时消息行不画标记。 */
|
|
9
|
+
export interface ConversationMessageForks {
|
|
10
|
+
readonly threads: readonly ConversationForkThread[];
|
|
11
|
+
openThread(threadId: string): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ConversationMessageRevealRequest {
|
|
15
|
+
readonly id: number;
|
|
16
|
+
readonly messageId: string;
|
|
17
|
+
readonly maxPages: number;
|
|
18
|
+
/** 已知轮次由宿主按轮次加载;界面保留该窗口,不回最新页再逐页找消息。 */
|
|
19
|
+
readonly turnId?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** 请求按机器和会话隔离;目标尚未挂载、尚未加载或不可见时不能提前消费。 */
|
|
23
|
+
export interface ConversationMessageReveal {
|
|
24
|
+
readonly request: ConversationMessageRevealRequest | null;
|
|
25
|
+
/** 来源正文尚未到达时不能把空窗口当成找不到。 */
|
|
26
|
+
readonly pending?: boolean;
|
|
27
|
+
readonly unavailable?: boolean;
|
|
28
|
+
/** 历史窗口读取失败的原因;不能把读取故障说成目标消息不存在。 */
|
|
29
|
+
readonly error?: string;
|
|
30
|
+
onHandled(requestId: number): void;
|
|
31
|
+
/** 翻页预算归宿主;同一窗口重复报告不重复请求,隐藏或受交互保护时等待。 */
|
|
32
|
+
advance(input: {
|
|
33
|
+
readonly found: boolean;
|
|
34
|
+
readonly ready: boolean;
|
|
35
|
+
readonly loading: boolean;
|
|
36
|
+
readonly blocked: boolean;
|
|
37
|
+
readonly hasEarlier: boolean;
|
|
38
|
+
readonly windowKey: string;
|
|
39
|
+
}): "found" | "missing" | "earlier" | "wait";
|
|
40
|
+
}
|