@ecsplico/editor 0.0.0-stage → 2.0.0
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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +232 -2
- package/dist/code/CodeSurface.d.ts +24 -0
- package/dist/code/CodeSurface.js +57 -0
- package/dist/code/CodeSurface.js.map +1 -0
- package/dist/code/CodeSurface.vue.d.ts +29 -0
- package/dist/code/CodeSurface2.js +75 -0
- package/dist/code/CodeSurface2.js.map +1 -0
- package/dist/code/chrome-theme.js +76 -0
- package/dist/code/chrome-theme.js.map +1 -0
- package/dist/code/compartments.js +19 -0
- package/dist/code/compartments.js.map +1 -0
- package/dist/code/editor-factory.d.ts +41 -0
- package/dist/code/editor-factory.js +126 -0
- package/dist/code/editor-factory.js.map +1 -0
- package/dist/code/format-json.d.ts +27 -0
- package/dist/code/format-json.js +94 -0
- package/dist/code/format-json.js.map +1 -0
- package/dist/code/highlight-style.js +118 -0
- package/dist/code/highlight-style.js.map +1 -0
- package/dist/code/index.d.ts +6 -0
- package/dist/code/index.js +6 -0
- package/dist/code/jsonl-language.d.ts +6 -0
- package/dist/code/jsonl-language.js +33 -0
- package/dist/code/jsonl-language.js.map +1 -0
- package/dist/code/kind.d.ts +15 -0
- package/dist/code/kind.js +142 -0
- package/dist/code/kind.js.map +1 -0
- package/dist/code/lang-registry.d.ts +31 -0
- package/dist/code/lang-registry.js +54 -0
- package/dist/code/lang-registry.js.map +1 -0
- package/dist/code/react.d.ts +2 -0
- package/dist/code/react.js +1 -0
- package/dist/code/vue.d.ts +2 -0
- package/dist/code/vue.js +1 -0
- package/dist/core/abilities.d.ts +32 -0
- package/dist/core/abilities.js +160 -0
- package/dist/core/abilities.js.map +1 -0
- package/dist/core/block-convert.d.ts +59 -0
- package/dist/core/block-convert.js +164 -0
- package/dist/core/block-convert.js.map +1 -0
- package/dist/core/block-drag.d.ts +12 -0
- package/dist/core/block-drag.js +62 -0
- package/dist/core/block-drag.js.map +1 -0
- package/dist/core/block-flash.d.ts +19 -0
- package/dist/core/block-flash.js +66 -0
- package/dist/core/block-flash.js.map +1 -0
- package/dist/core/context.d.ts +63 -0
- package/dist/core/context.js +108 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/convert.d.ts +96 -0
- package/dist/core/convert.js +241 -0
- package/dist/core/convert.js.map +1 -0
- package/dist/core/core-feature.d.ts +17 -0
- package/dist/core/core-feature.js +100 -0
- package/dist/core/core-feature.js.map +1 -0
- package/dist/core/define-editor.d.ts +23 -0
- package/dist/core/define-editor.js +110 -0
- package/dist/core/define-editor.js.map +1 -0
- package/dist/core/doc-anchors.d.ts +67 -0
- package/dist/core/doc-anchors.js +112 -0
- package/dist/core/doc-anchors.js.map +1 -0
- package/dist/core/document-markdown.d.ts +13 -0
- package/dist/core/document-markdown.js +31 -0
- package/dist/core/document-markdown.js.map +1 -0
- package/dist/core/download.d.ts +5 -0
- package/dist/core/download.js +16 -0
- package/dist/core/download.js.map +1 -0
- package/dist/core/editor-ui.d.ts +45 -0
- package/dist/core/editor-ui.js +38 -0
- package/dist/core/editor-ui.js.map +1 -0
- package/dist/core/extension-points.d.ts +64 -0
- package/dist/core/feature-context.d.ts +32 -0
- package/dist/core/feature-context.js +46 -0
- package/dist/core/feature-context.js.map +1 -0
- package/dist/core/feature.d.ts +234 -0
- package/dist/core/feature.js +13 -0
- package/dist/core/feature.js.map +1 -0
- package/dist/core/fences.d.ts +16 -0
- package/dist/core/fences.js +105 -0
- package/dist/core/fences.js.map +1 -0
- package/dist/core/fetch-error.d.ts +5 -0
- package/dist/core/fetch-error.js +11 -0
- package/dist/core/fetch-error.js.map +1 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.js +27 -0
- package/dist/core/metadata-types.d.ts +27 -0
- package/dist/core/metadata-types.js +10 -0
- package/dist/core/metadata-types.js.map +1 -0
- package/dist/core/metadata.d.ts +39 -0
- package/dist/core/metadata.js +76 -0
- package/dist/core/metadata.js.map +1 -0
- package/dist/core/notify.d.ts +31 -0
- package/dist/core/notify.js +7 -0
- package/dist/core/notify.js.map +1 -0
- package/dist/core/pipeline.d.ts +52 -0
- package/dist/core/pipeline.js +78 -0
- package/dist/core/pipeline.js.map +1 -0
- package/dist/core/schema/abilities.d.ts +55 -0
- package/dist/core/schema/abilities.js +113 -0
- package/dist/core/schema/abilities.js.map +1 -0
- package/dist/core/schema/block-ids.d.ts +29 -0
- package/dist/core/schema/block-ids.js +134 -0
- package/dist/core/schema/block-ids.js.map +1 -0
- package/dist/core/schema/hex-color.d.ts +5 -0
- package/dist/core/schema/hex-color.js +7 -0
- package/dist/core/schema/hex-color.js.map +1 -0
- package/dist/core/schema/index.d.ts +21 -0
- package/dist/core/schema/index.js +33 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/schema/mark-flags.d.ts +12 -0
- package/dist/core/schema/node-flags.d.ts +23 -0
- package/dist/core/schema/node-flags.js +34 -0
- package/dist/core/schema/node-flags.js.map +1 -0
- package/dist/core/schema/opaque-fence.d.ts +11 -0
- package/dist/core/schema/opaque-fence.js +57 -0
- package/dist/core/schema/opaque-fence.js.map +1 -0
- package/dist/core/schema/strike.d.ts +4 -0
- package/dist/core/schema/strike.js +9 -0
- package/dist/core/schema/strike.js.map +1 -0
- package/dist/core/selection-range.d.ts +13 -0
- package/dist/core/selection-range.js +28 -0
- package/dist/core/selection-range.js.map +1 -0
- package/dist/core/slash.d.ts +24 -0
- package/dist/core/slash.js +60 -0
- package/dist/core/slash.js.map +1 -0
- package/dist/core/store.d.ts +22 -0
- package/dist/core/store.js +61 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/suggestion-popup.d.ts +63 -0
- package/dist/core/suggestion-popup.js +57 -0
- package/dist/core/suggestion-popup.js.map +1 -0
- package/dist/core/tag-name.js +11 -0
- package/dist/core/tag-name.js.map +1 -0
- package/dist/core/toolbar-items.d.ts +10 -0
- package/dist/core/toolbar-items.js +206 -0
- package/dist/core/toolbar-items.js.map +1 -0
- package/dist/core/toolbar.d.ts +74 -0
- package/dist/core/toolbar.js +45 -0
- package/dist/core/toolbar.js.map +1 -0
- package/dist/document/DocumentSurface.d.ts +38 -0
- package/dist/document/DocumentSurface.js +44 -0
- package/dist/document/DocumentSurface.js.map +1 -0
- package/dist/document/DocumentSurface.vue.d.ts +56 -0
- package/dist/document/DocumentSurface2.js +71 -0
- package/dist/document/DocumentSurface2.js.map +1 -0
- package/dist/document/react.d.ts +2 -0
- package/dist/document/react.js +1 -0
- package/dist/document/vue.d.ts +2 -0
- package/dist/document/vue.js +1 -0
- package/dist/features/ai/agent-op-review.d.ts +69 -0
- package/dist/features/ai/agent-op-review.js +182 -0
- package/dist/features/ai/agent-op-review.js.map +1 -0
- package/dist/features/ai/agent-ops.d.ts +15 -0
- package/dist/features/ai/agent-ops.js +228 -0
- package/dist/features/ai/agent-ops.js.map +1 -0
- package/dist/features/ai/ai-apply.d.ts +76 -0
- package/dist/features/ai/ai-apply.js +193 -0
- package/dist/features/ai/ai-apply.js.map +1 -0
- package/dist/features/ai/ai-menu.d.ts +38 -0
- package/dist/features/ai/ai-menu.js +20 -0
- package/dist/features/ai/ai-menu.js.map +1 -0
- package/dist/features/ai/ai-review.d.ts +136 -0
- package/dist/features/ai/ai-review.js +543 -0
- package/dist/features/ai/ai-review.js.map +1 -0
- package/dist/features/ai/ai-selection-highlight.d.ts +21 -0
- package/dist/features/ai/ai-selection-highlight.js +44 -0
- package/dist/features/ai/ai-selection-highlight.js.map +1 -0
- package/dist/features/ai/ai-sse.d.ts +28 -0
- package/dist/features/ai/ai-sse.js +82 -0
- package/dist/features/ai/ai-sse.js.map +1 -0
- package/dist/features/ai/assistant.d.ts +53 -0
- package/dist/features/ai/assistant.js +82 -0
- package/dist/features/ai/assistant.js.map +1 -0
- package/dist/features/ai/block-actions.d.ts +20 -0
- package/dist/features/ai/block-actions.js +55 -0
- package/dist/features/ai/block-actions.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.js +145 -0
- package/dist/features/ai/components/AiReviewBar.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.vue.d.ts +15 -0
- package/dist/features/ai/components/AiSelectionMenu.js +519 -0
- package/dist/features/ai/components/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +17 -0
- package/dist/features/ai/components/AiSidebar.js +378 -0
- package/dist/features/ai/components/AiSidebar.js.map +1 -0
- package/dist/features/ai/components/AiSidebar.vue.d.ts +26 -0
- package/dist/features/ai/components/DocumentChatAnswer.js +67 -0
- package/dist/features/ai/components/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/components/DocumentChatAnswer.vue.d.ts +13 -0
- package/dist/features/ai/components/DocumentChatOps.js +113 -0
- package/dist/features/ai/components/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/components/DocumentChatOps.vue.d.ts +27 -0
- package/dist/features/ai/components/ModelQuickSwitch.js +84 -0
- package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +23 -0
- package/dist/features/ai/components/SettingsAiTab.js +88 -0
- package/dist/features/ai/components/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/components/SettingsAiTab.vue.d.ts +6 -0
- package/dist/features/ai/components/SettingsModelProfiles.js +260 -0
- package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/components/SettingsModelProfiles.vue.d.ts +6 -0
- package/dist/features/ai/document-chat-model.d.ts +88 -0
- package/dist/features/ai/document-chat-model.js +190 -0
- package/dist/features/ai/document-chat-model.js.map +1 -0
- package/dist/features/ai/document-chat.d.ts +17 -0
- package/dist/features/ai/document-chat.js +112 -0
- package/dist/features/ai/document-chat.js.map +1 -0
- package/dist/features/ai/feature.d.ts +25 -0
- package/dist/features/ai/feature.js +89 -0
- package/dist/features/ai/feature.js.map +1 -0
- package/dist/features/ai/ghost-autocomplete.d.ts +47 -0
- package/dist/features/ai/ghost-autocomplete.js +204 -0
- package/dist/features/ai/ghost-autocomplete.js.map +1 -0
- package/dist/features/ai/index.d.ts +24 -0
- package/dist/features/ai/index.js +23 -0
- package/dist/features/ai/model-profiles.d.ts +36 -0
- package/dist/features/ai/model-profiles.js +111 -0
- package/dist/features/ai/model-profiles.js.map +1 -0
- package/dist/features/ai/preview-extensions.js +14 -0
- package/dist/features/ai/preview-extensions.js.map +1 -0
- package/dist/features/ai/protocol/agent-ops.d.ts +120 -0
- package/dist/features/ai/protocol/agent-ops.js +298 -0
- package/dist/features/ai/protocol/agent-ops.js.map +1 -0
- package/dist/features/ai/protocol/chat.d.ts +57 -0
- package/dist/features/ai/protocol/chat.js +146 -0
- package/dist/features/ai/protocol/chat.js.map +1 -0
- package/dist/features/ai/protocol/complete.d.ts +21 -0
- package/dist/features/ai/protocol/complete.js +81 -0
- package/dist/features/ai/protocol/complete.js.map +1 -0
- package/dist/features/ai/protocol/index.d.ts +7 -0
- package/dist/features/ai/protocol/index.js +7 -0
- package/dist/features/ai/protocol/models.d.ts +48 -0
- package/dist/features/ai/protocol/models.js +41 -0
- package/dist/features/ai/protocol/models.js.map +1 -0
- package/dist/features/ai/protocol/schemas.d.ts +36 -0
- package/dist/features/ai/protocol/schemas.js +40 -0
- package/dist/features/ai/protocol/schemas.js.map +1 -0
- package/dist/features/ai/protocol/tasks.d.ts +107 -0
- package/dist/features/ai/protocol/tasks.js +227 -0
- package/dist/features/ai/protocol/tasks.js.map +1 -0
- package/dist/features/ai/rate-limit.d.ts +9 -0
- package/dist/features/ai/rate-limit.js +20 -0
- package/dist/features/ai/rate-limit.js.map +1 -0
- package/dist/features/ai/react/AiReviewBar.d.ts +12 -0
- package/dist/features/ai/react/AiReviewBar.js +156 -0
- package/dist/features/ai/react/AiReviewBar.js.map +1 -0
- package/dist/features/ai/react/AiSelectionMenu.d.ts +14 -0
- package/dist/features/ai/react/AiSelectionMenu.js +513 -0
- package/dist/features/ai/react/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/react/AiSidebar.d.ts +19 -0
- package/dist/features/ai/react/AiSidebar.js +339 -0
- package/dist/features/ai/react/AiSidebar.js.map +1 -0
- package/dist/features/ai/react/DocumentChatAnswer.d.ts +10 -0
- package/dist/features/ai/react/DocumentChatAnswer.js +70 -0
- package/dist/features/ai/react/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/react/DocumentChatOps.d.ts +19 -0
- package/dist/features/ai/react/DocumentChatOps.js +111 -0
- package/dist/features/ai/react/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/react/ModelQuickSwitch.d.ts +19 -0
- package/dist/features/ai/react/ModelQuickSwitch.js +89 -0
- package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/react/SettingsAiTab.d.ts +5 -0
- package/dist/features/ai/react/SettingsAiTab.js +103 -0
- package/dist/features/ai/react/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/react/SettingsModelProfiles.d.ts +8 -0
- package/dist/features/ai/react/SettingsModelProfiles.js +318 -0
- package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/react/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/react/use-ai-assistant.js +36 -0
- package/dist/features/ai/react/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/react/use-document-chat.d.ts +32 -0
- package/dist/features/ai/react/use-document-chat.js +43 -0
- package/dist/features/ai/react/use-document-chat.js.map +1 -0
- package/dist/features/ai/react/use-model-profiles.d.ts +20 -0
- package/dist/features/ai/react/use-model-profiles.js +33 -0
- package/dist/features/ai/react/use-model-profiles.js.map +1 -0
- package/dist/features/ai/react.d.ts +23 -0
- package/dist/features/ai/react.js +28 -0
- package/dist/features/ai/react.js.map +1 -0
- package/dist/features/ai/sidebar-flow.d.ts +61 -0
- package/dist/features/ai/sidebar-flow.js +125 -0
- package/dist/features/ai/sidebar-flow.js.map +1 -0
- package/dist/features/ai/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/use-ai-assistant.js +39 -0
- package/dist/features/ai/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/use-document-chat.d.ts +33 -0
- package/dist/features/ai/use-document-chat.js +45 -0
- package/dist/features/ai/use-document-chat.js.map +1 -0
- package/dist/features/ai/use-model-profiles.d.ts +23 -0
- package/dist/features/ai/use-model-profiles.js +50 -0
- package/dist/features/ai/use-model-profiles.js.map +1 -0
- package/dist/features/ai/vue.d.ts +21 -0
- package/dist/features/ai/vue.js +28 -0
- package/dist/features/ai/vue.js.map +1 -0
- package/dist/features/authors/attribution.d.ts +36 -0
- package/dist/features/authors/attribution.js +94 -0
- package/dist/features/authors/attribution.js.map +1 -0
- package/dist/features/authors/author-color-styles.d.ts +12 -0
- package/dist/features/authors/author-color-styles.js +24 -0
- package/dist/features/authors/author-color-styles.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.js +50 -0
- package/dist/features/authors/components/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.vue.d.ts +11 -0
- package/dist/features/authors/components/AuthorColorsPanel.js +72 -0
- package/dist/features/authors/components/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsPanel.vue.d.ts +11 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js +49 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/components/SettingsAuthorsTab.vue.d.ts +6 -0
- package/dist/features/authors/feature.d.ts +22 -0
- package/dist/features/authors/feature.js +47 -0
- package/dist/features/authors/feature.js.map +1 -0
- package/dist/features/authors/index.d.ts +7 -0
- package/dist/features/authors/index.js +6 -0
- package/dist/features/authors/react/AuthorColorsButton.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsButton.js +41 -0
- package/dist/features/authors/react/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/react/AuthorColorsPanel.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsPanel.js +125 -0
- package/dist/features/authors/react/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/react/SettingsAuthorsTab.d.ts +5 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js +92 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/react.d.ts +11 -0
- package/dist/features/authors/react.js +16 -0
- package/dist/features/authors/react.js.map +1 -0
- package/dist/features/authors/schema.d.ts +22 -0
- package/dist/features/authors/schema.js +70 -0
- package/dist/features/authors/schema.js.map +1 -0
- package/dist/features/authors/vue.d.ts +10 -0
- package/dist/features/authors/vue.js +16 -0
- package/dist/features/authors/vue.js.map +1 -0
- package/dist/features/block-ui/block-actions.d.ts +17 -0
- package/dist/features/block-ui/block-actions.js +37 -0
- package/dist/features/block-ui/block-actions.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.vue.d.ts +25 -0
- package/dist/features/block-ui/components/BlockHandles.js +113 -0
- package/dist/features/block-ui/components/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.js +181 -0
- package/dist/features/block-ui/components/BlockUi.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.vue.d.ts +17 -0
- package/dist/features/block-ui/feature.d.ts +21 -0
- package/dist/features/block-ui/feature.js +23 -0
- package/dist/features/block-ui/feature.js.map +1 -0
- package/dist/features/block-ui/handle-geometry.js +52 -0
- package/dist/features/block-ui/handle-geometry.js.map +1 -0
- package/dist/features/block-ui/index.d.ts +3 -0
- package/dist/features/block-ui/index.js +3 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.d.ts +19 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/react/BlockHandles.d.ts +15 -0
- package/dist/features/block-ui/react/BlockHandles.js +104 -0
- package/dist/features/block-ui/react/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/react/BlockUi.d.ts +14 -0
- package/dist/features/block-ui/react/BlockUi.js +174 -0
- package/dist/features/block-ui/react/BlockUi.js.map +1 -0
- package/dist/features/block-ui/react.d.ts +11 -0
- package/dist/features/block-ui/react.js +13 -0
- package/dist/features/block-ui/react.js.map +1 -0
- package/dist/features/block-ui/vue.d.ts +9 -0
- package/dist/features/block-ui/vue.js +12 -0
- package/dist/features/block-ui/vue.js.map +1 -0
- package/dist/features/collab/anchor-resolver.d.ts +7 -0
- package/dist/features/collab/anchor-resolver.js +92 -0
- package/dist/features/collab/anchor-resolver.js.map +1 -0
- package/dist/features/collab/feature.d.ts +22 -0
- package/dist/features/collab/feature.js +36 -0
- package/dist/features/collab/feature.js.map +1 -0
- package/dist/features/collab/index.d.ts +3 -0
- package/dist/features/collab/index.js +3 -0
- package/dist/features/collab/react.d.ts +7 -0
- package/dist/features/collab/react.js +10 -0
- package/dist/features/collab/react.js.map +1 -0
- package/dist/features/collab/vue.d.ts +6 -0
- package/dist/features/collab/vue.js +37 -0
- package/dist/features/collab/vue.js.map +1 -0
- package/dist/features/comments/comments-plugin.d.ts +71 -0
- package/dist/features/comments/comments-plugin.js +185 -0
- package/dist/features/comments/comments-plugin.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.js +54 -0
- package/dist/features/comments/components/CommentBubble.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.vue.d.ts +14 -0
- package/dist/features/comments/components/CommentComposer.js +87 -0
- package/dist/features/comments/components/CommentComposer.js.map +1 -0
- package/dist/features/comments/components/CommentComposer.vue.d.ts +21 -0
- package/dist/features/comments/components/CommentThreadView.js +255 -0
- package/dist/features/comments/components/CommentThreadView.js.map +1 -0
- package/dist/features/comments/components/CommentThreadView.vue.d.ts +29 -0
- package/dist/features/comments/components/CommentsListMenu.js +134 -0
- package/dist/features/comments/components/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/components/CommentsListMenu.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsMargin.js +291 -0
- package/dist/features/comments/components/CommentsMargin.js.map +1 -0
- package/dist/features/comments/components/CommentsMargin.vue.d.ts +16 -0
- package/dist/features/comments/components/CommentsOverlay.js +39 -0
- package/dist/features/comments/components/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.js +124 -0
- package/dist/features/comments/components/CommentsPopover.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsToolbarButton.js +61 -0
- package/dist/features/comments/components/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.js +46 -0
- package/dist/features/comments/components/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.vue.d.ts +6 -0
- package/dist/features/comments/feature.d.ts +39 -0
- package/dist/features/comments/feature.js +128 -0
- package/dist/features/comments/feature.js.map +1 -0
- package/dist/features/comments/index.d.ts +6 -0
- package/dist/features/comments/index.js +6 -0
- package/dist/features/comments/model.d.ts +87 -0
- package/dist/features/comments/model.js +390 -0
- package/dist/features/comments/model.js.map +1 -0
- package/dist/features/comments/react/CommentAvatar.js +24 -0
- package/dist/features/comments/react/CommentAvatar.js.map +1 -0
- package/dist/features/comments/react/CommentBubble.d.ts +11 -0
- package/dist/features/comments/react/CommentBubble.js +43 -0
- package/dist/features/comments/react/CommentBubble.js.map +1 -0
- package/dist/features/comments/react/CommentComposer.d.ts +15 -0
- package/dist/features/comments/react/CommentComposer.js +69 -0
- package/dist/features/comments/react/CommentComposer.js.map +1 -0
- package/dist/features/comments/react/CommentThreadView.d.ts +24 -0
- package/dist/features/comments/react/CommentThreadView.js +249 -0
- package/dist/features/comments/react/CommentThreadView.js.map +1 -0
- package/dist/features/comments/react/CommentsListMenu.d.ts +8 -0
- package/dist/features/comments/react/CommentsListMenu.js +115 -0
- package/dist/features/comments/react/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/react/CommentsMargin.d.ts +16 -0
- package/dist/features/comments/react/CommentsMargin.js +294 -0
- package/dist/features/comments/react/CommentsMargin.js.map +1 -0
- package/dist/features/comments/react/CommentsOverlay.d.ts +11 -0
- package/dist/features/comments/react/CommentsOverlay.js +52 -0
- package/dist/features/comments/react/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/react/CommentsPopover.d.ts +15 -0
- package/dist/features/comments/react/CommentsPopover.js +107 -0
- package/dist/features/comments/react/CommentsPopover.js.map +1 -0
- package/dist/features/comments/react/CommentsToolbarButton.d.ts +12 -0
- package/dist/features/comments/react/CommentsToolbarButton.js +52 -0
- package/dist/features/comments/react/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/react/SettingsCommentsTab.d.ts +5 -0
- package/dist/features/comments/react/SettingsCommentsTab.js +77 -0
- package/dist/features/comments/react/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/react/use-comments.d.ts +17 -0
- package/dist/features/comments/react/use-comments.js +37 -0
- package/dist/features/comments/react/use-comments.js.map +1 -0
- package/dist/features/comments/react.d.ts +23 -0
- package/dist/features/comments/react.js +28 -0
- package/dist/features/comments/react.js.map +1 -0
- package/dist/features/comments/schema.d.ts +51 -0
- package/dist/features/comments/schema.js +41 -0
- package/dist/features/comments/schema.js.map +1 -0
- package/dist/features/comments/shortcuts.js +34 -0
- package/dist/features/comments/shortcuts.js.map +1 -0
- package/dist/features/comments/use-comments.d.ts +37 -0
- package/dist/features/comments/use-comments.js +45 -0
- package/dist/features/comments/use-comments.js.map +1 -0
- package/dist/features/comments/vue.d.ts +20 -0
- package/dist/features/comments/vue.js +28 -0
- package/dist/features/comments/vue.js.map +1 -0
- package/dist/features/composites/ai-brief.d.ts +31 -0
- package/dist/features/composites/ai-brief.js +56 -0
- package/dist/features/composites/ai-brief.js.map +1 -0
- package/dist/features/composites/anchors.d.ts +47 -0
- package/dist/features/composites/anchors.js +137 -0
- package/dist/features/composites/anchors.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.js +243 -0
- package/dist/features/composites/components/CompositeChrome.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeDetails.js +158 -0
- package/dist/features/composites/components/CompositeDetails.js.map +1 -0
- package/dist/features/composites/components/CompositeDetails.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeFieldEditor.js +114 -0
- package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +23 -0
- package/dist/features/composites/components/CompositeInspector.js +439 -0
- package/dist/features/composites/components/CompositeInspector.js.map +1 -0
- package/dist/features/composites/components/CompositeInspector.vue.d.ts +32 -0
- package/dist/features/composites/components/CompositeStatusMenu.js +51 -0
- package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/components/CompositeStatusMenu.vue.d.ts +28 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js +79 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +18 -0
- package/dist/features/composites/components/CompositeTable.js +348 -0
- package/dist/features/composites/components/CompositeTable.js.map +1 -0
- package/dist/features/composites/components/CompositeTable.vue.d.ts +15 -0
- package/dist/features/composites/components/CompositeTagsEditor.js +95 -0
- package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +13 -0
- package/dist/features/composites/components/CompositeView.js +46 -0
- package/dist/features/composites/components/CompositeView.js.map +1 -0
- package/dist/features/composites/components/CompositeView.vue.d.ts +96 -0
- package/dist/features/composites/components/SettingsEditingTab.js +119 -0
- package/dist/features/composites/components/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +11 -0
- package/dist/features/composites/convert.d.ts +24 -0
- package/dist/features/composites/convert.js +145 -0
- package/dist/features/composites/convert.js.map +1 -0
- package/dist/features/composites/editing-settings-keys.js +47 -0
- package/dist/features/composites/editing-settings-keys.js.map +1 -0
- package/dist/features/composites/feature.d.ts +30 -0
- package/dist/features/composites/feature.js +305 -0
- package/dist/features/composites/feature.js.map +1 -0
- package/dist/features/composites/fences.d.ts +20 -0
- package/dist/features/composites/fences.js +86 -0
- package/dist/features/composites/fences.js.map +1 -0
- package/dist/features/composites/heading-composites.d.ts +36 -0
- package/dist/features/composites/heading-composites.js +140 -0
- package/dist/features/composites/heading-composites.js.map +1 -0
- package/dist/features/composites/index.d.ts +20 -0
- package/dist/features/composites/index.js +20 -0
- package/dist/features/composites/kinds.d.ts +49 -0
- package/dist/features/composites/kinds.js +131 -0
- package/dist/features/composites/kinds.js.map +1 -0
- package/dist/features/composites/legacy.d.ts +8 -0
- package/dist/features/composites/legacy.js +25 -0
- package/dist/features/composites/legacy.js.map +1 -0
- package/dist/features/composites/markdown-export.d.ts +17 -0
- package/dist/features/composites/markdown-export.js +49 -0
- package/dist/features/composites/markdown-export.js.map +1 -0
- package/dist/features/composites/meta-display.js +46 -0
- package/dist/features/composites/meta-display.js.map +1 -0
- package/dist/features/composites/node-views.d.ts +17 -0
- package/dist/features/composites/node-views.js +18 -0
- package/dist/features/composites/node-views.js.map +1 -0
- package/dist/features/composites/nodes.d.ts +56 -0
- package/dist/features/composites/nodes.js +480 -0
- package/dist/features/composites/nodes.js.map +1 -0
- package/dist/features/composites/outline.d.ts +35 -0
- package/dist/features/composites/outline.js +69 -0
- package/dist/features/composites/outline.js.map +1 -0
- package/dist/features/composites/react/CompositeChrome.d.ts +16 -0
- package/dist/features/composites/react/CompositeChrome.js +234 -0
- package/dist/features/composites/react/CompositeChrome.js.map +1 -0
- package/dist/features/composites/react/CompositeDetails.d.ts +16 -0
- package/dist/features/composites/react/CompositeDetails.js +149 -0
- package/dist/features/composites/react/CompositeDetails.js.map +1 -0
- package/dist/features/composites/react/CompositeFieldEditor.d.ts +18 -0
- package/dist/features/composites/react/CompositeFieldEditor.js +131 -0
- package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeInspector.d.ts +23 -0
- package/dist/features/composites/react/CompositeInspector.js +506 -0
- package/dist/features/composites/react/CompositeInspector.js.map +1 -0
- package/dist/features/composites/react/CompositeStatusMenu.d.ts +15 -0
- package/dist/features/composites/react/CompositeStatusMenu.js +36 -0
- package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/react/CompositeSummaryEditor.d.ts +15 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js +85 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeTable.d.ts +11 -0
- package/dist/features/composites/react/CompositeTable.js +342 -0
- package/dist/features/composites/react/CompositeTable.js.map +1 -0
- package/dist/features/composites/react/CompositeTagsEditor.d.ts +10 -0
- package/dist/features/composites/react/CompositeTagsEditor.js +122 -0
- package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeView.d.ts +6 -0
- package/dist/features/composites/react/CompositeView.js +30 -0
- package/dist/features/composites/react/CompositeView.js.map +1 -0
- package/dist/features/composites/react/SettingsEditingTab.d.ts +8 -0
- package/dist/features/composites/react/SettingsEditingTab.js +153 -0
- package/dist/features/composites/react/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/react/use-composite-anchors.d.ts +17 -0
- package/dist/features/composites/react/use-composite-anchors.js +46 -0
- package/dist/features/composites/react/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/react/use-composite-rows.d.ts +11 -0
- package/dist/features/composites/react/use-composite-rows.js +26 -0
- package/dist/features/composites/react/use-composite-rows.js.map +1 -0
- package/dist/features/composites/react.d.ts +24 -0
- package/dist/features/composites/react.js +30 -0
- package/dist/features/composites/react.js.map +1 -0
- package/dist/features/composites/rows-model.d.ts +38 -0
- package/dist/features/composites/rows-model.js +92 -0
- package/dist/features/composites/rows-model.js.map +1 -0
- package/dist/features/composites/rows.d.ts +76 -0
- package/dist/features/composites/rows.js +159 -0
- package/dist/features/composites/rows.js.map +1 -0
- package/dist/features/composites/schema.d.ts +21 -0
- package/dist/features/composites/schema.js +26 -0
- package/dist/features/composites/schema.js.map +1 -0
- package/dist/features/composites/structure-mode.d.ts +11 -0
- package/dist/features/composites/structure-mode.js +16 -0
- package/dist/features/composites/structure-mode.js.map +1 -0
- package/dist/features/composites/structure.d.ts +19 -0
- package/dist/features/composites/structure.js +19 -0
- package/dist/features/composites/structure.js.map +1 -0
- package/dist/features/composites/table-model.js +117 -0
- package/dist/features/composites/table-model.js.map +1 -0
- package/dist/features/composites/tree-root.d.ts +11 -0
- package/dist/features/composites/tree-root.js +16 -0
- package/dist/features/composites/tree-root.js.map +1 -0
- package/dist/features/composites/use-composite-anchors.d.ts +18 -0
- package/dist/features/composites/use-composite-anchors.js +42 -0
- package/dist/features/composites/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/use-composite-rows.d.ts +25 -0
- package/dist/features/composites/use-composite-rows.js +28 -0
- package/dist/features/composites/use-composite-rows.js.map +1 -0
- package/dist/features/composites/vue.d.ts +23 -0
- package/dist/features/composites/vue.js +30 -0
- package/dist/features/composites/vue.js.map +1 -0
- package/dist/features/media/assets.d.ts +30 -0
- package/dist/features/media/assets.js +26 -0
- package/dist/features/media/assets.js.map +1 -0
- package/dist/features/media/audio-recorder.d.ts +25 -0
- package/dist/features/media/audio-recorder.js +123 -0
- package/dist/features/media/audio-recorder.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.js +152 -0
- package/dist/features/media/components/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.vue.d.ts +15 -0
- package/dist/features/media/components/AudioView.js +46 -0
- package/dist/features/media/components/AudioView.js.map +1 -0
- package/dist/features/media/components/FileView.js +73 -0
- package/dist/features/media/components/FileView.js.map +1 -0
- package/dist/features/media/components/VideoView.js +47 -0
- package/dist/features/media/components/VideoView.js.map +1 -0
- package/dist/features/media/feature.d.ts +22 -0
- package/dist/features/media/feature.js +101 -0
- package/dist/features/media/feature.js.map +1 -0
- package/dist/features/media/file-import.d.ts +21 -0
- package/dist/features/media/file-import.js +76 -0
- package/dist/features/media/file-import.js.map +1 -0
- package/dist/features/media/index.d.ts +7 -0
- package/dist/features/media/index.js +7 -0
- package/dist/features/media/node-views.d.ts +28 -0
- package/dist/features/media/node-views.js +28 -0
- package/dist/features/media/node-views.js.map +1 -0
- package/dist/features/media/react/AudioRecorderModal.d.ts +12 -0
- package/dist/features/media/react/AudioRecorderModal.js +147 -0
- package/dist/features/media/react/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/react/AudioView.js +32 -0
- package/dist/features/media/react/AudioView.js.map +1 -0
- package/dist/features/media/react/FileView.js +61 -0
- package/dist/features/media/react/FileView.js.map +1 -0
- package/dist/features/media/react/TitleField.js +30 -0
- package/dist/features/media/react/TitleField.js.map +1 -0
- package/dist/features/media/react/VideoView.js +33 -0
- package/dist/features/media/react/VideoView.js.map +1 -0
- package/dist/features/media/react/use-audio-recorder.d.ts +11 -0
- package/dist/features/media/react/use-audio-recorder.js +21 -0
- package/dist/features/media/react/use-audio-recorder.js.map +1 -0
- package/dist/features/media/react.d.ts +19 -0
- package/dist/features/media/react.js +37 -0
- package/dist/features/media/react.js.map +1 -0
- package/dist/features/media/schema.d.ts +59 -0
- package/dist/features/media/schema.js +194 -0
- package/dist/features/media/schema.js.map +1 -0
- package/dist/features/media/upload.d.ts +41 -0
- package/dist/features/media/upload.js +106 -0
- package/dist/features/media/upload.js.map +1 -0
- package/dist/features/media/use-audio-recorder.d.ts +12 -0
- package/dist/features/media/use-audio-recorder.js +21 -0
- package/dist/features/media/use-audio-recorder.js.map +1 -0
- package/dist/features/media/vue.d.ts +19 -0
- package/dist/features/media/vue.js +35 -0
- package/dist/features/media/vue.js.map +1 -0
- package/dist/features/mentions/index.d.ts +22 -0
- package/dist/features/mentions/index.js +34 -0
- package/dist/features/mentions/index.js.map +1 -0
- package/dist/features/mentions/mention-suggestion.d.ts +11 -0
- package/dist/features/mentions/mention-suggestion.js +34 -0
- package/dist/features/mentions/mention-suggestion.js.map +1 -0
- package/dist/features/mentions/mention-text.d.ts +18 -0
- package/dist/features/mentions/mention-text.js +75 -0
- package/dist/features/mentions/mention-text.js.map +1 -0
- package/dist/features/mentions/mention.d.ts +20 -0
- package/dist/features/mentions/mention.js +33 -0
- package/dist/features/mentions/mention.js.map +1 -0
- package/dist/features/mentions/metadata-defaults.d.ts +8 -0
- package/dist/features/mentions/metadata-defaults.js +30 -0
- package/dist/features/mentions/metadata-defaults.js.map +1 -0
- package/dist/features/mentions/normalize.d.ts +10 -0
- package/dist/features/mentions/normalize.js +31 -0
- package/dist/features/mentions/normalize.js.map +1 -0
- package/dist/features/mentions/schema.d.ts +10 -0
- package/dist/features/mentions/schema.js +10 -0
- package/dist/features/mentions/schema.js.map +1 -0
- package/dist/features/mentions/tag-suggestion.d.ts +11 -0
- package/dist/features/mentions/tag-suggestion.js +45 -0
- package/dist/features/mentions/tag-suggestion.js.map +1 -0
- package/dist/features/mentions/tag.d.ts +43 -0
- package/dist/features/mentions/tag.js +155 -0
- package/dist/features/mentions/tag.js.map +1 -0
- package/dist/features/tables/feature.d.ts +14 -0
- package/dist/features/tables/feature.js +100 -0
- package/dist/features/tables/feature.js.map +1 -0
- package/dist/features/tables/index.d.ts +3 -0
- package/dist/features/tables/index.js +3 -0
- package/dist/features/tables/schema.d.ts +6 -0
- package/dist/features/tables/schema.js +27 -0
- package/dist/features/tables/schema.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js +227 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.vue.d.ts +6 -0
- package/dist/features/themes/feature.d.ts +24 -0
- package/dist/features/themes/feature.js +25 -0
- package/dist/features/themes/feature.js.map +1 -0
- package/dist/features/themes/index.d.ts +6 -0
- package/dist/features/themes/index.js +6 -0
- package/dist/features/themes/react/SettingsAppearanceTab.d.ts +5 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js +221 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/react.d.ts +13 -0
- package/dist/features/themes/react.js +15 -0
- package/dist/features/themes/react.js.map +1 -0
- package/dist/features/themes/schema.d.ts +21 -0
- package/dist/features/themes/schema.js +16 -0
- package/dist/features/themes/schema.js.map +1 -0
- package/dist/features/themes/scope-css.d.ts +5 -0
- package/dist/features/themes/scope-css.js +142 -0
- package/dist/features/themes/scope-css.js.map +1 -0
- package/dist/features/themes/theme-runtime.d.ts +14 -0
- package/dist/features/themes/theme-runtime.js +147 -0
- package/dist/features/themes/theme-runtime.js.map +1 -0
- package/dist/features/themes/vue.d.ts +13 -0
- package/dist/features/themes/vue.js +29 -0
- package/dist/features/themes/vue.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.js +169 -0
- package/dist/features/transcript/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.vue.d.ts +96 -0
- package/dist/features/transcript/convert.d.ts +11 -0
- package/dist/features/transcript/convert.js +40 -0
- package/dist/features/transcript/convert.js.map +1 -0
- package/dist/features/transcript/feature.d.ts +25 -0
- package/dist/features/transcript/feature.js +59 -0
- package/dist/features/transcript/feature.js.map +1 -0
- package/dist/features/transcript/index.d.ts +7 -0
- package/dist/features/transcript/index.js +7 -0
- package/dist/features/transcript/react/TranscriptSegmentView.d.ts +6 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js +155 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/react.d.ts +9 -0
- package/dist/features/transcript/react.js +12 -0
- package/dist/features/transcript/react.js.map +1 -0
- package/dist/features/transcript/schema.d.ts +9 -0
- package/dist/features/transcript/schema.js +9 -0
- package/dist/features/transcript/schema.js.map +1 -0
- package/dist/features/transcript/segment-node.d.ts +21 -0
- package/dist/features/transcript/segment-node.js +113 -0
- package/dist/features/transcript/segment-node.js.map +1 -0
- package/dist/features/transcript/segment.d.ts +10 -0
- package/dist/features/transcript/segment.js +26 -0
- package/dist/features/transcript/segment.js.map +1 -0
- package/dist/features/transcript/speakers.d.ts +8 -0
- package/dist/features/transcript/speakers.js +22 -0
- package/dist/features/transcript/speakers.js.map +1 -0
- package/dist/features/transcript/vue.d.ts +8 -0
- package/dist/features/transcript/vue.js +12 -0
- package/dist/features/transcript/vue.js.map +1 -0
- package/dist/i18n/de/ai.js +168 -0
- package/dist/i18n/de/ai.js.map +1 -0
- package/dist/i18n/de/authors.js +21 -0
- package/dist/i18n/de/authors.js.map +1 -0
- package/dist/i18n/de/block.js +16 -0
- package/dist/i18n/de/block.js.map +1 -0
- package/dist/i18n/de/comments.js +35 -0
- package/dist/i18n/de/comments.js.map +1 -0
- package/dist/i18n/de/common.js +10 -0
- package/dist/i18n/de/common.js.map +1 -0
- package/dist/i18n/de/composites.js +147 -0
- package/dist/i18n/de/composites.js.map +1 -0
- package/dist/i18n/de/integrations.js +42 -0
- package/dist/i18n/de/integrations.js.map +1 -0
- package/dist/i18n/de/markdown.js +16 -0
- package/dist/i18n/de/markdown.js.map +1 -0
- package/dist/i18n/de/media.js +27 -0
- package/dist/i18n/de/media.js.map +1 -0
- package/dist/i18n/de/mentions.js +10 -0
- package/dist/i18n/de/mentions.js.map +1 -0
- package/dist/i18n/de/outline.js +9 -0
- package/dist/i18n/de/outline.js.map +1 -0
- package/dist/i18n/de/settings.js +12 -0
- package/dist/i18n/de/settings.js.map +1 -0
- package/dist/i18n/de/tables.js +15 -0
- package/dist/i18n/de/tables.js.map +1 -0
- package/dist/i18n/de/themes.js +26 -0
- package/dist/i18n/de/themes.js.map +1 -0
- package/dist/i18n/de/toolbar.js +22 -0
- package/dist/i18n/de/toolbar.js.map +1 -0
- package/dist/i18n/de/transcript.js +10 -0
- package/dist/i18n/de/transcript.js.map +1 -0
- package/dist/i18n/de/tree.js +31 -0
- package/dist/i18n/de/tree.js.map +1 -0
- package/dist/i18n/de.d.ts +502 -0
- package/dist/i18n/de.js +42 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/en/ai.js +168 -0
- package/dist/i18n/en/ai.js.map +1 -0
- package/dist/i18n/en/authors.js +21 -0
- package/dist/i18n/en/authors.js.map +1 -0
- package/dist/i18n/en/block.js +16 -0
- package/dist/i18n/en/block.js.map +1 -0
- package/dist/i18n/en/comments.js +35 -0
- package/dist/i18n/en/comments.js.map +1 -0
- package/dist/i18n/en/common.js +10 -0
- package/dist/i18n/en/common.js.map +1 -0
- package/dist/i18n/en/composites.js +145 -0
- package/dist/i18n/en/composites.js.map +1 -0
- package/dist/i18n/en/integrations.js +42 -0
- package/dist/i18n/en/integrations.js.map +1 -0
- package/dist/i18n/en/markdown.js +16 -0
- package/dist/i18n/en/markdown.js.map +1 -0
- package/dist/i18n/en/media.js +27 -0
- package/dist/i18n/en/media.js.map +1 -0
- package/dist/i18n/en/mentions.js +10 -0
- package/dist/i18n/en/mentions.js.map +1 -0
- package/dist/i18n/en/outline.js +9 -0
- package/dist/i18n/en/outline.js.map +1 -0
- package/dist/i18n/en/settings.js +12 -0
- package/dist/i18n/en/settings.js.map +1 -0
- package/dist/i18n/en/tables.js +15 -0
- package/dist/i18n/en/tables.js.map +1 -0
- package/dist/i18n/en/themes.js +26 -0
- package/dist/i18n/en/themes.js.map +1 -0
- package/dist/i18n/en/toolbar.js +22 -0
- package/dist/i18n/en/toolbar.js.map +1 -0
- package/dist/i18n/en/transcript.js +10 -0
- package/dist/i18n/en/transcript.js.map +1 -0
- package/dist/i18n/en/tree.js +31 -0
- package/dist/i18n/en/tree.js.map +1 -0
- package/dist/i18n/en.js +42 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.js +31 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +0 -0
- package/dist/integrations/composite-ai/composite-fill.d.ts +17 -0
- package/dist/integrations/composite-ai/composite-fill.js +129 -0
- package/dist/integrations/composite-ai/composite-fill.js.map +1 -0
- package/dist/integrations/composite-ai/composite-summary.d.ts +28 -0
- package/dist/integrations/composite-ai/composite-summary.js +143 -0
- package/dist/integrations/composite-ai/composite-summary.js.map +1 -0
- package/dist/integrations/composite-ai/document-transcribe.d.ts +14 -0
- package/dist/integrations/composite-ai/document-transcribe.js +89 -0
- package/dist/integrations/composite-ai/document-transcribe.js.map +1 -0
- package/dist/integrations/composite-ai/index.d.ts +22 -0
- package/dist/integrations/composite-ai/index.js +80 -0
- package/dist/integrations/composite-ai/index.js.map +1 -0
- package/dist/integrations/composite-media/index.d.ts +19 -0
- package/dist/integrations/composite-media/index.js +72 -0
- package/dist/integrations/composite-media/index.js.map +1 -0
- package/dist/integrations/transcript-ai/index.d.ts +16 -0
- package/dist/integrations/transcript-ai/index.js +63 -0
- package/dist/integrations/transcript-ai/index.js.map +1 -0
- package/dist/integrations/transcript-ai/protocol.d.ts +68 -0
- package/dist/integrations/transcript-ai/protocol.js +132 -0
- package/dist/integrations/transcript-ai/protocol.js.map +1 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +35 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js +169 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -0
- package/dist/markdown/MarkdownSurface.d.ts +25 -0
- package/dist/markdown/MarkdownSurface.js +93 -0
- package/dist/markdown/MarkdownSurface.js.map +1 -0
- package/dist/markdown/MarkdownSurface.vue.d.ts +76 -0
- package/dist/markdown/MarkdownSurface2.js +237 -0
- package/dist/markdown/MarkdownSurface2.js.map +1 -0
- package/dist/markdown/clipboard.d.ts +17 -0
- package/dist/markdown/clipboard.js +125 -0
- package/dist/markdown/clipboard.js.map +1 -0
- package/dist/markdown/document.d.ts +36 -0
- package/dist/markdown/document.js +100 -0
- package/dist/markdown/document.js.map +1 -0
- package/dist/markdown/frontmatter.d.ts +18 -0
- package/dist/markdown/frontmatter.js +32 -0
- package/dist/markdown/frontmatter.js.map +1 -0
- package/dist/markdown/index.d.ts +6 -0
- package/dist/markdown/index.js +6 -0
- package/dist/markdown/policy.d.ts +34 -0
- package/dist/markdown/policy.js +78 -0
- package/dist/markdown/policy.js.map +1 -0
- package/dist/markdown/react.d.ts +2 -0
- package/dist/markdown/react.js +1 -0
- package/dist/markdown/source-mode.d.ts +49 -0
- package/dist/markdown/source-mode.js +86 -0
- package/dist/markdown/source-mode.js.map +1 -0
- package/dist/markdown/vue.d.ts +2 -0
- package/dist/markdown/vue.js +1 -0
- package/dist/nuxt/module.d.ts +62 -0
- package/dist/nuxt/module.js +101 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/install-context.d.ts +16 -0
- package/dist/nuxt/runtime/install-context.js +25 -0
- package/dist/nuxt/runtime/install-context.js.map +1 -0
- package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/collab.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/collab.js +10 -0
- package/dist/nuxt/runtime/server/plugins/collab.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js +20 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].d.ts +5 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js +35 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js.map +1 -0
- package/dist/nuxt/runtime/server/utils/editor-route.d.ts +11 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js +49 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js.map +1 -0
- package/dist/outline/EditorOutline.js +124 -0
- package/dist/outline/EditorOutline.js.map +1 -0
- package/dist/outline/EditorOutline.vue.d.ts +15 -0
- package/dist/outline/heading-outline.d.ts +26 -0
- package/dist/outline/heading-outline.js +46 -0
- package/dist/outline/heading-outline.js.map +1 -0
- package/dist/outline/index.d.ts +2 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/react/EditorOutline.d.ts +12 -0
- package/dist/outline/react/EditorOutline.js +112 -0
- package/dist/outline/react/EditorOutline.js.map +1 -0
- package/dist/outline/react.d.ts +2 -0
- package/dist/outline/react.js +1 -0
- package/dist/outline/vue.d.ts +2 -0
- package/dist/outline/vue.js +1 -0
- package/dist/presets/advanced.d.ts +33 -0
- package/dist/presets/advanced.js +50 -0
- package/dist/presets/advanced.js.map +1 -0
- package/dist/presets/simple.d.ts +9 -0
- package/dist/presets/simple.js +12 -0
- package/dist/presets/simple.js.map +1 -0
- package/dist/react/AdvancedEditor.d.ts +23 -0
- package/dist/react/AdvancedEditor.js +24 -0
- package/dist/react/AdvancedEditor.js.map +1 -0
- package/dist/react/EditorSettingsModal.d.ts +14 -0
- package/dist/react/EditorSettingsModal.js +40 -0
- package/dist/react/EditorSettingsModal.js.map +1 -0
- package/dist/react/EditorSettingsPanel.d.ts +18 -0
- package/dist/react/EditorSettingsPanel.js +40 -0
- package/dist/react/EditorSettingsPanel.js.map +1 -0
- package/dist/react/EditorSurface.d.ts +61 -0
- package/dist/react/EditorSurface.js +277 -0
- package/dist/react/EditorSurface.js.map +1 -0
- package/dist/react/EditorToolbar.d.ts +15 -0
- package/dist/react/EditorToolbar.js +182 -0
- package/dist/react/EditorToolbar.js.map +1 -0
- package/dist/react/Icon.d.ts +13 -0
- package/dist/react/Icon.js +19 -0
- package/dist/react/Icon.js.map +1 -0
- package/dist/react/SettingsSection.d.ts +10 -0
- package/dist/react/SettingsSection.js +22 -0
- package/dist/react/SettingsSection.js.map +1 -0
- package/dist/react/SimpleEditor.d.ts +27 -0
- package/dist/react/SimpleEditor.js +22 -0
- package/dist/react/SimpleEditor.js.map +1 -0
- package/dist/react/advanced-preset.d.ts +11 -0
- package/dist/react/advanced-preset.js +31 -0
- package/dist/react/advanced-preset.js.map +1 -0
- package/dist/react/advanced.d.ts +4 -0
- package/dist/react/advanced.js +3 -0
- package/dist/react/context.d.ts +12 -0
- package/dist/react/context.js +21 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/editor-ui.d.ts +14 -0
- package/dist/react/editor-ui.js +20 -0
- package/dist/react/editor-ui.js.map +1 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.js +17 -0
- package/dist/react/notify.d.ts +6 -0
- package/dist/react/notify.js +25 -0
- package/dist/react/notify.js.map +1 -0
- package/dist/react/settings.d.ts +17 -0
- package/dist/react/settings.js +27 -0
- package/dist/react/settings.js.map +1 -0
- package/dist/react/simple.d.ts +2 -0
- package/dist/react/simple.js +1 -0
- package/dist/react/styles/advanced.css +18 -0
- package/dist/react/styles/themes-bridge.css +26 -0
- package/dist/react/styles/ui-vars.css +20 -0
- package/dist/react/suggestion-renderer.d.ts +12 -0
- package/dist/react/suggestion-renderer.js +90 -0
- package/dist/react/suggestion-renderer.js.map +1 -0
- package/dist/react/ui/alert.js +38 -0
- package/dist/react/ui/alert.js.map +1 -0
- package/dist/react/ui/avatar.js +24 -0
- package/dist/react/ui/avatar.js.map +1 -0
- package/dist/react/ui/badge.js +30 -0
- package/dist/react/ui/badge.js.map +1 -0
- package/dist/react/ui/button.js +50 -0
- package/dist/react/ui/button.js.map +1 -0
- package/dist/react/ui/collapsible.js +19 -0
- package/dist/react/ui/collapsible.js.map +1 -0
- package/dist/react/ui/command.js +47 -0
- package/dist/react/ui/command.js.map +1 -0
- package/dist/react/ui/dialog.js +88 -0
- package/dist/react/ui/dialog.js.map +1 -0
- package/dist/react/ui/dropdown-menu.js +70 -0
- package/dist/react/ui/dropdown-menu.js.map +1 -0
- package/dist/react/ui/input-group.js +57 -0
- package/dist/react/ui/input-group.js.map +1 -0
- package/dist/react/ui/input.js +16 -0
- package/dist/react/ui/input.js.map +1 -0
- package/dist/react/ui/label.js +17 -0
- package/dist/react/ui/label.js.map +1 -0
- package/dist/react/ui/popover.js +36 -0
- package/dist/react/ui/popover.js.map +1 -0
- package/dist/react/ui/radio-group.js +29 -0
- package/dist/react/ui/radio-group.js.map +1 -0
- package/dist/react/ui/select.js +88 -0
- package/dist/react/ui/select.js.map +1 -0
- package/dist/react/ui/separator.js +18 -0
- package/dist/react/ui/separator.js.map +1 -0
- package/dist/react/ui/switch.js +21 -0
- package/dist/react/ui/switch.js.map +1 -0
- package/dist/react/ui/table.js +44 -0
- package/dist/react/ui/table.js.map +1 -0
- package/dist/react/ui/tabs.js +41 -0
- package/dist/react/ui/tabs.js.map +1 -0
- package/dist/react/ui/textarea.js +15 -0
- package/dist/react/ui/textarea.js.map +1 -0
- package/dist/react/ui/tooltip.js +37 -0
- package/dist/react/ui/tooltip.js.map +1 -0
- package/dist/react/ui/utils.d.ts +5 -0
- package/dist/react/ui/utils.js +10 -0
- package/dist/react/ui/utils.js.map +1 -0
- package/dist/react/use-editor-i18n.d.ts +12 -0
- package/dist/react/use-editor-i18n.js +17 -0
- package/dist/react/use-editor-i18n.js.map +1 -0
- package/dist/react/use-notifier.d.ts +11 -0
- package/dist/react/use-notifier.js +25 -0
- package/dist/react/use-notifier.js.map +1 -0
- package/dist/react/use-store.d.ts +6 -0
- package/dist/react/use-store.js +10 -0
- package/dist/react/use-store.js.map +1 -0
- package/dist/schema/advanced.d.ts +14 -0
- package/dist/schema/advanced.js +43 -0
- package/dist/schema/advanced.js.map +1 -0
- package/dist/schema/simple.d.ts +10 -0
- package/dist/schema/simple.js +13 -0
- package/dist/schema/simple.js.map +1 -0
- package/dist/server/adapter.d.ts +101 -0
- package/dist/server/ai.d.ts +101 -0
- package/dist/server/ai.js +105 -0
- package/dist/server/ai.js.map +1 -0
- package/dist/server/collab-state.d.ts +16 -0
- package/dist/server/collab-state.js +43 -0
- package/dist/server/collab-state.js.map +1 -0
- package/dist/server/collab.d.ts +68 -0
- package/dist/server/collab.js +187 -0
- package/dist/server/collab.js.map +1 -0
- package/dist/server/errors.d.ts +17 -0
- package/dist/server/errors.js +26 -0
- package/dist/server/errors.js.map +1 -0
- package/dist/server/handlers/ai.d.ts +223 -0
- package/dist/server/handlers/ai.js +422 -0
- package/dist/server/handlers/ai.js.map +1 -0
- package/dist/server/handlers/context.d.ts +64 -0
- package/dist/server/handlers/context.js +85 -0
- package/dist/server/handlers/context.js.map +1 -0
- package/dist/server/handlers/editor.d.ts +107 -0
- package/dist/server/handlers/editor.js +241 -0
- package/dist/server/handlers/editor.js.map +1 -0
- package/dist/server/handlers/index.d.ts +4 -0
- package/dist/server/handlers/index.js +4 -0
- package/dist/server/host.d.ts +61 -0
- package/dist/server/host.js +105 -0
- package/dist/server/host.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +7 -0
- package/dist/server/node.d.ts +24 -0
- package/dist/server/node.js +54 -0
- package/dist/server/node.js.map +1 -0
- package/dist/server/rate-limit.d.ts +22 -0
- package/dist/server/rate-limit.js +34 -0
- package/dist/server/rate-limit.js.map +1 -0
- package/dist/settings/index.d.ts +110 -0
- package/dist/settings/index.js +114 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/values.d.ts +35 -0
- package/dist/settings/values.js +41 -0
- package/dist/settings/values.js.map +1 -0
- package/dist/styles/ai.css +77 -0
- package/dist/styles/authors.css +18 -0
- package/dist/styles/block-ui.css +16 -0
- package/dist/styles/collab.css +26 -0
- package/dist/styles/comments.css +11 -0
- package/dist/styles/composites.css +56 -0
- package/dist/styles/core.css +99 -0
- package/dist/styles/media.css +8 -0
- package/dist/styles/mentions.css +24 -0
- package/dist/styles/tables.css +25 -0
- package/dist/styles/themes.css +622 -0
- package/dist/styles/tokens.css +29 -0
- package/dist/styles/transcript.css +13 -0
- package/dist/tree/DocumentTree.js +595 -0
- package/dist/tree/DocumentTree.js.map +1 -0
- package/dist/tree/DocumentTree.vue.d.ts +36 -0
- package/dist/tree/folder-paths.js +11 -0
- package/dist/tree/folder-paths.js.map +1 -0
- package/dist/tree/index.d.ts +4 -0
- package/dist/tree/index.js +1 -0
- package/dist/tree/react/DocumentTree.d.ts +24 -0
- package/dist/tree/react/DocumentTree.js +579 -0
- package/dist/tree/react/DocumentTree.js.map +1 -0
- package/dist/tree/react/use-tree-view.d.ts +14 -0
- package/dist/tree/react/use-tree-view.js +21 -0
- package/dist/tree/react/use-tree-view.js.map +1 -0
- package/dist/tree/react.d.ts +3 -0
- package/dist/tree/react.js +3 -0
- package/dist/tree/store.d.ts +45 -0
- package/dist/tree/tree-items.js +221 -0
- package/dist/tree/tree-items.js.map +1 -0
- package/dist/tree/tree-view-model.d.ts +29 -0
- package/dist/tree/tree-view-model.js +71 -0
- package/dist/tree/tree-view-model.js.map +1 -0
- package/dist/tree/tree-view.d.ts +15 -0
- package/dist/tree/tree-view.js +21 -0
- package/dist/tree/tree-view.js.map +1 -0
- package/dist/tree/types.d.ts +23 -0
- package/dist/tree/types.js +0 -0
- package/dist/tree/vue.d.ts +3 -0
- package/dist/tree/vue.js +3 -0
- package/dist/vue/AdvancedEditor.js +100 -0
- package/dist/vue/AdvancedEditor.js.map +1 -0
- package/dist/vue/AdvancedEditor.vue.d.ts +71 -0
- package/dist/vue/SimpleEditor.js +61 -0
- package/dist/vue/SimpleEditor.js.map +1 -0
- package/dist/vue/SimpleEditor.vue.d.ts +36 -0
- package/dist/vue/advanced-preset.d.ts +13 -0
- package/dist/vue/advanced-preset.js +33 -0
- package/dist/vue/advanced-preset.js.map +1 -0
- package/dist/vue/advanced.d.ts +3 -0
- package/dist/vue/advanced.js +3 -0
- package/dist/vue/components/EditorSettingsModal.js +69 -0
- package/dist/vue/components/EditorSettingsModal.js.map +1 -0
- package/dist/vue/components/EditorSettingsModal.vue.d.ts +24 -0
- package/dist/vue/components/EditorSettingsPanel.js +58 -0
- package/dist/vue/components/EditorSettingsPanel.js.map +1 -0
- package/dist/vue/components/EditorSettingsPanel.vue.d.ts +29 -0
- package/dist/vue/components/EditorSurface.js +229 -0
- package/dist/vue/components/EditorSurface.js.map +1 -0
- package/dist/vue/components/EditorSurface.vue.d.ts +68 -0
- package/dist/vue/components/EditorToolbar.js +189 -0
- package/dist/vue/components/EditorToolbar.js.map +1 -0
- package/dist/vue/components/EditorToolbar.vue.d.ts +17 -0
- package/dist/vue/components/SettingsSection.js +26 -0
- package/dist/vue/components/SettingsSection.js.map +1 -0
- package/dist/vue/components/SettingsSection.vue.d.ts +21 -0
- package/dist/vue/components/SuggestionList.js +91 -0
- package/dist/vue/components/SuggestionList.js.map +1 -0
- package/dist/vue/components/SuggestionList.vue.d.ts +19 -0
- package/dist/vue/context.d.ts +24 -0
- package/dist/vue/context.js +42 -0
- package/dist/vue/context.js.map +1 -0
- package/dist/vue/index.d.ts +26 -0
- package/dist/vue/index.js +16 -0
- package/dist/vue/kit/index.d.ts +3 -0
- package/dist/vue/kit/index.js +1 -0
- package/dist/vue/kit/nuxt-ui.css +24 -0
- package/dist/vue/kit/nuxt-ui.d.ts +31 -0
- package/dist/vue/kit/nuxt-ui.js +101 -0
- package/dist/vue/kit/nuxt-ui.js.map +1 -0
- package/dist/vue/kit/types.d.ts +370 -0
- package/dist/vue/kit/use-ui-kit.d.ts +12 -0
- package/dist/vue/kit/use-ui-kit.js +17 -0
- package/dist/vue/kit/use-ui-kit.js.map +1 -0
- package/dist/vue/notify.d.ts +12 -0
- package/dist/vue/notify.js +27 -0
- package/dist/vue/notify.js.map +1 -0
- package/dist/vue/settings.d.ts +16 -0
- package/dist/vue/settings.js +64 -0
- package/dist/vue/settings.js.map +1 -0
- package/dist/vue/simple.d.ts +2 -0
- package/dist/vue/simple.js +1 -0
- package/dist/vue/store-ref.d.ts +20 -0
- package/dist/vue/store-ref.js +59 -0
- package/dist/vue/store-ref.js.map +1 -0
- package/dist/vue/suggestion-renderer.d.ts +6 -0
- package/dist/vue/suggestion-renderer.js +20 -0
- package/dist/vue/suggestion-renderer.js.map +1 -0
- package/dist/vue/use-editor-i18n.d.ts +12 -0
- package/dist/vue/use-editor-i18n.js +17 -0
- package/dist/vue/use-editor-i18n.js.map +1 -0
- package/dist/vue/use-editor-ui.d.ts +15 -0
- package/dist/vue/use-editor-ui.js +23 -0
- package/dist/vue/use-editor-ui.js.map +1 -0
- package/dist/vue/use-notifier.d.ts +11 -0
- package/dist/vue/use-notifier.js +19 -0
- package/dist/vue/use-notifier.js.map +1 -0
- package/docs/extending.md +538 -0
- package/docs/integration.md +537 -0
- package/docs/llms.md +375 -0
- package/docs/usage.md +1071 -0
- package/package.json +619 -4
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { ABILITY } from "../../core/schema/abilities.js";
|
|
2
|
+
import { hasAbility } from "../../core/abilities.js";
|
|
3
|
+
import { anchorResolverOf } from "../../core/doc-anchors.js";
|
|
4
|
+
import { AI_COMPLETE_LIMITS } from "./protocol/complete.js";
|
|
5
|
+
import { Extension } from "@tiptap/core";
|
|
6
|
+
import { Plugin, PluginKey, TextSelection } from "@tiptap/pm/state";
|
|
7
|
+
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
8
|
+
//#region src/features/ai/ghost-autocomplete.ts
|
|
9
|
+
const ghostAutocompleteKey = new PluginKey("ghostAutocomplete");
|
|
10
|
+
/** Text of the caret's textblock, when the caret is an empty selection at the end of a non-empty, non-code textblock. */
|
|
11
|
+
function blockTextAtEnd(state) {
|
|
12
|
+
const { selection } = state;
|
|
13
|
+
if (!(selection instanceof TextSelection) || !selection.empty) return null;
|
|
14
|
+
const { $head } = selection;
|
|
15
|
+
const block = $head.parent;
|
|
16
|
+
if (!block.isTextblock || block.type.spec.code || $head.parentOffset !== block.content.size) return null;
|
|
17
|
+
const text = block.textContent;
|
|
18
|
+
return text.trim() ? text : null;
|
|
19
|
+
}
|
|
20
|
+
/** Keeps a suggestion across a collaborator's change only if the caret block is untouched and the caret stayed with it. */
|
|
21
|
+
function mapSuggestion(suggestion, tr, oldState, newState) {
|
|
22
|
+
const mapped = tr.mapping.mapResult(suggestion.pos);
|
|
23
|
+
if (mapped.deleted || newState.selection.head !== mapped.pos) return null;
|
|
24
|
+
const text = blockTextAtEnd(newState);
|
|
25
|
+
if (text === null || text !== oldState.doc.resolve(suggestion.pos).parent.textContent) return null;
|
|
26
|
+
return {
|
|
27
|
+
text: suggestion.text,
|
|
28
|
+
pos: mapped.pos
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** The suggestion source of the app behind `host`: `POST /api/ai/complete` on the profile of the `complete` slot. */
|
|
32
|
+
function completionFetcher(host) {
|
|
33
|
+
return async (before, signal) => {
|
|
34
|
+
const { text } = await host.fetch("/api/ai/complete", {
|
|
35
|
+
method: "POST",
|
|
36
|
+
body: {
|
|
37
|
+
before,
|
|
38
|
+
model: host.modelRef("complete")
|
|
39
|
+
},
|
|
40
|
+
signal
|
|
41
|
+
});
|
|
42
|
+
return text;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Inline AI autocomplete: after a typing pause at the end of a non-empty textblock, a short continuation is shown as grey
|
|
47
|
+
* ghost text after the caret. Tab accepts it as normal text, Esc dismisses it; typing, caret moves and blur clear it.
|
|
48
|
+
* The suggestion is a local widget decoration — never part of the document, so collaborators never see it.
|
|
49
|
+
* On while the editor setting `ai.autocomplete` is (see `useEditorSettings`); turning it off clears the ghost.
|
|
50
|
+
* Client-only: not part of `schemaExtensions()`.
|
|
51
|
+
*/
|
|
52
|
+
const ghostAutocomplete = (options) => Extension.create({
|
|
53
|
+
name: "ghostAutocomplete",
|
|
54
|
+
priority: 1e3,
|
|
55
|
+
addKeyboardShortcuts() {
|
|
56
|
+
return {
|
|
57
|
+
Tab: ({ editor }) => {
|
|
58
|
+
const suggestion = ghostAutocompleteKey.getState(editor.state)?.suggestion;
|
|
59
|
+
const { selection } = editor.state;
|
|
60
|
+
if (!suggestion || !selection.empty || selection.head !== suggestion.pos) return false;
|
|
61
|
+
const end = suggestion.pos + suggestion.text.length;
|
|
62
|
+
const tr = editor.state.tr.insertText(suggestion.text, suggestion.pos);
|
|
63
|
+
editor.view.dispatch(tr.setSelection(TextSelection.create(tr.doc, end)).scrollIntoView());
|
|
64
|
+
return true;
|
|
65
|
+
},
|
|
66
|
+
Escape: ({ editor }) => {
|
|
67
|
+
if (!ghostAutocompleteKey.getState(editor.state)?.suggestion) return false;
|
|
68
|
+
editor.view.dispatch(editor.state.tr.setMeta(ghostAutocompleteKey, { type: "clear" }));
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
addProseMirrorPlugins() {
|
|
74
|
+
const { editor } = this;
|
|
75
|
+
const { settings } = options;
|
|
76
|
+
let timer;
|
|
77
|
+
let inFlight = null;
|
|
78
|
+
function cancel() {
|
|
79
|
+
clearTimeout(timer);
|
|
80
|
+
timer = void 0;
|
|
81
|
+
inFlight?.abort();
|
|
82
|
+
inFlight = null;
|
|
83
|
+
}
|
|
84
|
+
function eligible(view) {
|
|
85
|
+
const { state } = view;
|
|
86
|
+
if (!settings.get().ai.autocomplete || !editor.isEditable || !view.hasFocus() || view.composing || blockTextAtEnd(state) === null) return false;
|
|
87
|
+
if (!hasAbility(editor, ABILITY.aiAutocomplete)) return false;
|
|
88
|
+
return !state.plugins.some((plugin) => {
|
|
89
|
+
const pluginState = plugin.getState(state);
|
|
90
|
+
return typeof pluginState === "object" && pluginState !== null && "query" in pluginState && "active" in pluginState && pluginState.active === true;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async function request(view, activity) {
|
|
94
|
+
timer = void 0;
|
|
95
|
+
const { state } = view;
|
|
96
|
+
if (ghostAutocompleteKey.getState(state)?.activity !== activity || !eligible(view)) return;
|
|
97
|
+
const pos = state.selection.head;
|
|
98
|
+
const blockText = blockTextAtEnd(state);
|
|
99
|
+
const before = state.doc.textBetween(Math.max(0, pos - AI_COMPLETE_LIMITS.before * 2), pos, "\n\n").slice(-AI_COMPLETE_LIMITS.before);
|
|
100
|
+
const controller = new AbortController();
|
|
101
|
+
inFlight = controller;
|
|
102
|
+
let text;
|
|
103
|
+
try {
|
|
104
|
+
text = await options.fetchSuggestion(before, controller.signal);
|
|
105
|
+
} catch {
|
|
106
|
+
return;
|
|
107
|
+
} finally {
|
|
108
|
+
if (inFlight === controller) inFlight = null;
|
|
109
|
+
}
|
|
110
|
+
if (controller.signal.aborted || !text || view.isDestroyed) return;
|
|
111
|
+
const now = view.state;
|
|
112
|
+
if (ghostAutocompleteKey.getState(now)?.activity !== activity || !eligible(view) || blockTextAtEnd(now) !== blockText) return;
|
|
113
|
+
view.dispatch(now.tr.setMeta(ghostAutocompleteKey, {
|
|
114
|
+
type: "show",
|
|
115
|
+
suggestion: {
|
|
116
|
+
text,
|
|
117
|
+
pos: now.selection.head
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
return [new Plugin({
|
|
122
|
+
key: ghostAutocompleteKey,
|
|
123
|
+
state: {
|
|
124
|
+
init: () => ({
|
|
125
|
+
suggestion: null,
|
|
126
|
+
edits: 0,
|
|
127
|
+
activity: 0
|
|
128
|
+
}),
|
|
129
|
+
apply(tr, prev, oldState, newState) {
|
|
130
|
+
const meta = tr.getMeta(ghostAutocompleteKey);
|
|
131
|
+
const remote = anchorResolverOf(editor)?.isRemoteChange(tr) ?? false;
|
|
132
|
+
const edited = tr.docChanged && !remote;
|
|
133
|
+
const moved = tr.selectionSet && !remote;
|
|
134
|
+
let suggestion = prev.suggestion;
|
|
135
|
+
if (meta?.type === "show") suggestion = meta.suggestion;
|
|
136
|
+
else if (meta?.type === "clear" || edited || moved) suggestion = null;
|
|
137
|
+
else if (suggestion && tr.docChanged) suggestion = mapSuggestion(suggestion, tr, oldState, newState);
|
|
138
|
+
if (suggestion === prev.suggestion && !edited && !moved) return prev;
|
|
139
|
+
return {
|
|
140
|
+
suggestion,
|
|
141
|
+
edits: prev.edits + (edited ? 1 : 0),
|
|
142
|
+
activity: prev.activity + (edited || moved ? 1 : 0)
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
props: {
|
|
147
|
+
decorations(state) {
|
|
148
|
+
const suggestion = ghostAutocompleteKey.getState(state)?.suggestion;
|
|
149
|
+
if (!suggestion) return null;
|
|
150
|
+
const widget = Decoration.widget(suggestion.pos, () => {
|
|
151
|
+
const span = document.createElement("span");
|
|
152
|
+
span.className = "ghost-autocomplete";
|
|
153
|
+
span.contentEditable = "false";
|
|
154
|
+
span.setAttribute("aria-hidden", "true");
|
|
155
|
+
span.textContent = suggestion.text;
|
|
156
|
+
return span;
|
|
157
|
+
}, {
|
|
158
|
+
side: 1,
|
|
159
|
+
key: `ghost:${suggestion.text}`,
|
|
160
|
+
ignoreSelection: true
|
|
161
|
+
});
|
|
162
|
+
return DecorationSet.create(state.doc, [widget]);
|
|
163
|
+
},
|
|
164
|
+
handleDOMEvents: { blur(view) {
|
|
165
|
+
cancel();
|
|
166
|
+
if (ghostAutocompleteKey.getState(view.state)?.suggestion) view.dispatch(view.state.tr.setMeta(ghostAutocompleteKey, { type: "clear" }));
|
|
167
|
+
return false;
|
|
168
|
+
} }
|
|
169
|
+
},
|
|
170
|
+
view: (view) => {
|
|
171
|
+
let last = settings.get().ai.autocomplete;
|
|
172
|
+
const stop = settings.subscribe((value) => {
|
|
173
|
+
const enabled = value.ai.autocomplete;
|
|
174
|
+
if (enabled === last) return;
|
|
175
|
+
last = enabled;
|
|
176
|
+
if (enabled || view.isDestroyed) return;
|
|
177
|
+
cancel();
|
|
178
|
+
if (ghostAutocompleteKey.getState(view.state)?.suggestion) view.dispatch(view.state.tr.setMeta(ghostAutocompleteKey, { type: "clear" }));
|
|
179
|
+
});
|
|
180
|
+
return {
|
|
181
|
+
update(view, prevState) {
|
|
182
|
+
const next = ghostAutocompleteKey.getState(view.state);
|
|
183
|
+
const prev = ghostAutocompleteKey.getState(prevState);
|
|
184
|
+
if (!next || !prev) return;
|
|
185
|
+
if (!settings.get().ai.autocomplete) return cancel();
|
|
186
|
+
if (next.activity === prev.activity) return;
|
|
187
|
+
cancel();
|
|
188
|
+
if (next.edits === prev.edits || !eligible(view)) return;
|
|
189
|
+
const activity = next.activity;
|
|
190
|
+
timer = window.setTimeout(() => void request(view, activity), options.debounce);
|
|
191
|
+
},
|
|
192
|
+
destroy() {
|
|
193
|
+
stop();
|
|
194
|
+
cancel();
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
})];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
//#endregion
|
|
202
|
+
export { completionFetcher, ghostAutocomplete, ghostAutocompleteKey };
|
|
203
|
+
|
|
204
|
+
//# sourceMappingURL=ghost-autocomplete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghost-autocomplete.js","names":[],"sources":["../../../src/features/ai/ghost-autocomplete.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { type EditorState, Plugin, PluginKey, TextSelection, type Transaction } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet, type EditorView } from '@tiptap/pm/view'\nimport type { Store } from '../../core/store'\nimport { anchorResolverOf, hasAbility } from '../../core'\nimport { ABILITY } from '../../core/schema'\nimport type { EditorSettings, ModelSlot } from '../../settings'\nimport type { $Fetch } from 'ofetch'\nimport { AI_COMPLETE_LIMITS, type ModelRef } from './protocol'\n\nexport interface GhostAutocompleteOptions {\n /** The app's shared settings: `ai.autocomplete` switches the suggestions on. */\n settings: Store<EditorSettings>\n /** Pause after the last keystroke before a suggestion is requested (ms). */\n debounce: number\n /** Fetches a continuation of `before` (document text up to the caret); '' for none. Must honour `signal`. */\n fetchSuggestion: (before: string, signal: AbortSignal) => Promise<string>\n}\n\ninterface Suggestion { text: string, pos: number }\ninterface GhostState {\n suggestion: Suggestion | null\n /** Bumped by local edits: each bump starts a new pause, so at most one request follows it. */\n edits: number\n /** Bumped by local edits and caret moves: an in-flight request is stale once this changed. */\n activity: number\n}\ntype GhostMeta = { type: 'show', suggestion: Suggestion } | { type: 'clear' }\n\nexport const ghostAutocompleteKey = new PluginKey<GhostState>('ghostAutocomplete')\n\n/** Text of the caret's textblock, when the caret is an empty selection at the end of a non-empty, non-code textblock. */\nfunction blockTextAtEnd(state: EditorState): string | null {\n const { selection } = state\n if (!(selection instanceof TextSelection) || !selection.empty) return null\n const { $head } = selection\n const block = $head.parent\n if (!block.isTextblock || block.type.spec.code || $head.parentOffset !== block.content.size) return null\n const text = block.textContent\n return text.trim() ? text : null\n}\n\n/** Keeps a suggestion across a collaborator's change only if the caret block is untouched and the caret stayed with it. */\nfunction mapSuggestion(suggestion: Suggestion, tr: Transaction, oldState: EditorState, newState: EditorState): Suggestion | null {\n const mapped = tr.mapping.mapResult(suggestion.pos)\n if (mapped.deleted || newState.selection.head !== mapped.pos) return null\n const text = blockTextAtEnd(newState)\n if (text === null || text !== oldState.doc.resolve(suggestion.pos).parent.textContent) return null\n return { text: suggestion.text, pos: mapped.pos }\n}\n\n/** What the suggestion source needs of the app: its HTTP client and the model profile of a slot (`useModelProfiles`). */\nexport interface CompletionHost {\n fetch: $Fetch\n modelRef: (slot: ModelSlot) => ModelRef\n}\n\n/** The suggestion source of the app behind `host`: `POST /api/ai/complete` on the profile of the `complete` slot. */\nexport function completionFetcher(host: CompletionHost): GhostAutocompleteOptions['fetchSuggestion'] {\n return async (before, signal) => {\n const { text } = await host.fetch<{ text: string }>('/api/ai/complete', { method: 'POST', body: { before, model: host.modelRef('complete') }, signal })\n return text\n }\n}\n\n/**\n * Inline AI autocomplete: after a typing pause at the end of a non-empty textblock, a short continuation is shown as grey\n * ghost text after the caret. Tab accepts it as normal text, Esc dismisses it; typing, caret moves and blur clear it.\n * The suggestion is a local widget decoration — never part of the document, so collaborators never see it.\n * On while the editor setting `ai.autocomplete` is (see `useEditorSettings`); turning it off clears the ghost.\n * Client-only: not part of `schemaExtensions()`.\n */\nexport const ghostAutocomplete = (options: GhostAutocompleteOptions) => Extension.create({\n name: 'ghostAutocomplete',\n // Runs its Tab/Escape bindings before ListItem's Tab (sinkListItem); both return false without a suggestion.\n priority: 1000,\n\n addKeyboardShortcuts() {\n return {\n Tab: ({ editor }) => {\n const suggestion = ghostAutocompleteKey.getState(editor.state)?.suggestion\n const { selection } = editor.state\n if (!suggestion || !selection.empty || selection.head !== suggestion.pos) return false\n const end = suggestion.pos + suggestion.text.length\n const tr = editor.state.tr.insertText(suggestion.text, suggestion.pos)\n editor.view.dispatch(tr.setSelection(TextSelection.create(tr.doc, end)).scrollIntoView())\n return true\n },\n Escape: ({ editor }) => {\n if (!ghostAutocompleteKey.getState(editor.state)?.suggestion) return false\n editor.view.dispatch(editor.state.tr.setMeta(ghostAutocompleteKey, { type: 'clear' } satisfies GhostMeta))\n return true\n },\n }\n },\n\n addProseMirrorPlugins() {\n const { editor } = this\n const { settings } = options\n let timer: number | undefined\n let inFlight: AbortController | null = null\n\n function cancel() {\n clearTimeout(timer)\n timer = undefined\n inFlight?.abort()\n inFlight = null\n }\n\n function eligible(view: EditorView): boolean {\n const { state } = view\n if (!settings.get().ai.autocomplete || !editor.isEditable || !view.hasFocus() || view.composing || blockTextAtEnd(state) === null) return false\n if (!hasAbility(editor, ABILITY.aiAutocomplete)) return false\n // No ghost while an @tiptap/suggestion popup (e.g. `@` mentions) is open: its state is `{ active, query, … }`.\n return !state.plugins.some((plugin) => {\n const pluginState: unknown = plugin.getState(state)\n return typeof pluginState === 'object' && pluginState !== null && 'query' in pluginState && 'active' in pluginState && pluginState.active === true\n })\n }\n\n async function request(view: EditorView, activity: number) {\n timer = undefined\n const { state } = view\n if (ghostAutocompleteKey.getState(state)?.activity !== activity || !eligible(view)) return\n const pos = state.selection.head\n const blockText = blockTextAtEnd(state)\n // Positions count at least one per character, so twice the limit in positions covers the character limit.\n const before = state.doc.textBetween(Math.max(0, pos - AI_COMPLETE_LIMITS.before * 2), pos, '\\n\\n').slice(-AI_COMPLETE_LIMITS.before)\n const controller = new AbortController()\n inFlight = controller\n let text: string\n try {\n text = await options.fetchSuggestion(before, controller.signal)\n } catch {\n // Aborted, rate-limited (429) or failed: autocomplete is a silent nicety, so no ghost and no toast.\n return\n } finally {\n if (inFlight === controller) inFlight = null\n }\n if (controller.signal.aborted || !text || view.isDestroyed) return\n // Stale-response guard: no local edit or caret move since the request, and the caret block text is unchanged\n // (a collaborator's change elsewhere may have shifted the caret position).\n const now = view.state\n if (ghostAutocompleteKey.getState(now)?.activity !== activity || !eligible(view) || blockTextAtEnd(now) !== blockText) return\n view.dispatch(now.tr.setMeta(ghostAutocompleteKey, { type: 'show', suggestion: { text, pos: now.selection.head } } satisfies GhostMeta))\n }\n\n return [\n new Plugin<GhostState>({\n key: ghostAutocompleteKey,\n state: {\n init: () => ({ suggestion: null, edits: 0, activity: 0 }),\n apply(tr, prev, oldState, newState) {\n const meta = tr.getMeta(ghostAutocompleteKey) as GhostMeta | undefined\n // A collaborator's edit (the collaboration feature's resolver tells); the user's own undo/redo is not remote.\n const remote = anchorResolverOf(editor)?.isRemoteChange(tr) ?? false\n const edited = tr.docChanged && !remote\n const moved = tr.selectionSet && !remote\n let suggestion = prev.suggestion\n if (meta?.type === 'show') suggestion = meta.suggestion\n else if (meta?.type === 'clear' || edited || moved) suggestion = null\n else if (suggestion && tr.docChanged) suggestion = mapSuggestion(suggestion, tr, oldState, newState)\n if (suggestion === prev.suggestion && !edited && !moved) return prev\n return { suggestion, edits: prev.edits + (edited ? 1 : 0), activity: prev.activity + (edited || moved ? 1 : 0) }\n },\n },\n props: {\n decorations(state) {\n const suggestion = ghostAutocompleteKey.getState(state)?.suggestion\n if (!suggestion) return null\n const widget = Decoration.widget(suggestion.pos, () => {\n const span = document.createElement('span')\n span.className = 'ghost-autocomplete'\n span.contentEditable = 'false'\n span.setAttribute('aria-hidden', 'true')\n span.textContent = suggestion.text\n return span\n }, { side: 1, key: `ghost:${suggestion.text}`, ignoreSelection: true })\n return DecorationSet.create(state.doc, [widget])\n },\n handleDOMEvents: {\n blur(view) {\n cancel()\n if (ghostAutocompleteKey.getState(view.state)?.suggestion) {\n view.dispatch(view.state.tr.setMeta(ghostAutocompleteKey, { type: 'clear' } satisfies GhostMeta))\n }\n return false\n },\n },\n },\n view: (view) => {\n // Turned off (toolbar or settings): drop the pending request and the shown ghost right away.\n let last = settings.get().ai.autocomplete\n const stop = settings.subscribe((value) => {\n const enabled = value.ai.autocomplete\n if (enabled === last) return\n last = enabled\n if (enabled || view.isDestroyed) return\n cancel()\n if (ghostAutocompleteKey.getState(view.state)?.suggestion) {\n view.dispatch(view.state.tr.setMeta(ghostAutocompleteKey, { type: 'clear' } satisfies GhostMeta))\n }\n })\n return {\n update(view, prevState) {\n const next = ghostAutocompleteKey.getState(view.state)\n const prev = ghostAutocompleteKey.getState(prevState)\n if (!next || !prev) return\n if (!settings.get().ai.autocomplete) return cancel()\n if (next.activity === prev.activity) return\n // Typing or a caret move: drop the pending pause and abort the in-flight request.\n cancel()\n // Only a local edit starts a new pause; caret moves alone never request.\n if (next.edits === prev.edits || !eligible(view)) return\n const activity = next.activity\n timer = window.setTimeout(() => void request(view, activity), options.debounce)\n },\n destroy() {\n stop()\n cancel()\n },\n }\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;;;AA6BA,MAAa,uBAAuB,IAAI,UAAsB,mBAAmB;;AAGjF,SAAS,eAAe,OAAmC;CACzD,MAAM,EAAE,cAAc;CACtB,IAAI,EAAE,qBAAqB,kBAAkB,CAAC,UAAU,OAAO,OAAO;CACtE,MAAM,EAAE,UAAU;CAClB,MAAM,QAAQ,MAAM;CACpB,IAAI,CAAC,MAAM,eAAe,MAAM,KAAK,KAAK,QAAQ,MAAM,iBAAiB,MAAM,QAAQ,MAAM,OAAO;CACpG,MAAM,OAAO,MAAM;CACnB,OAAO,KAAK,KAAK,IAAI,OAAO;AAC9B;;AAGA,SAAS,cAAc,YAAwB,IAAiB,UAAuB,UAA0C;CAC/H,MAAM,SAAS,GAAG,QAAQ,UAAU,WAAW,GAAG;CAClD,IAAI,OAAO,WAAW,SAAS,UAAU,SAAS,OAAO,KAAK,OAAO;CACrE,MAAM,OAAO,eAAe,QAAQ;CACpC,IAAI,SAAS,QAAQ,SAAS,SAAS,IAAI,QAAQ,WAAW,GAAG,CAAC,CAAC,OAAO,aAAa,OAAO;CAC9F,OAAO;EAAE,MAAM,WAAW;EAAM,KAAK,OAAO;CAAI;AAClD;;AASA,SAAgB,kBAAkB,MAAmE;CACnG,OAAO,OAAO,QAAQ,WAAW;EAC/B,MAAM,EAAE,SAAS,MAAM,KAAK,MAAwB,oBAAoB;GAAE,QAAQ;GAAQ,MAAM;IAAE;IAAQ,OAAO,KAAK,SAAS,UAAU;GAAE;GAAG;EAAO,CAAC;EACtJ,OAAO;CACT;AACF;;;;;;;;AASA,MAAa,qBAAqB,YAAsC,UAAU,OAAO;CACvF,MAAM;CAEN,UAAU;CAEV,uBAAuB;EACrB,OAAO;GACL,MAAM,EAAE,aAAa;IACnB,MAAM,aAAa,qBAAqB,SAAS,OAAO,KAAK,CAAC,EAAE;IAChE,MAAM,EAAE,cAAc,OAAO;IAC7B,IAAI,CAAC,cAAc,CAAC,UAAU,SAAS,UAAU,SAAS,WAAW,KAAK,OAAO;IACjF,MAAM,MAAM,WAAW,MAAM,WAAW,KAAK;IAC7C,MAAM,KAAK,OAAO,MAAM,GAAG,WAAW,WAAW,MAAM,WAAW,GAAG;IACrE,OAAO,KAAK,SAAS,GAAG,aAAa,cAAc,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC;IACxF,OAAO;GACT;GACA,SAAS,EAAE,aAAa;IACtB,IAAI,CAAC,qBAAqB,SAAS,OAAO,KAAK,CAAC,EAAE,YAAY,OAAO;IACrE,OAAO,KAAK,SAAS,OAAO,MAAM,GAAG,QAAQ,sBAAsB,EAAE,MAAM,QAAQ,CAAqB,CAAC;IACzG,OAAO;GACT;EACF;CACF;CAEA,wBAAwB;EACtB,MAAM,EAAE,WAAW;EACnB,MAAM,EAAE,aAAa;EACrB,IAAI;EACJ,IAAI,WAAmC;EAEvC,SAAS,SAAS;GAChB,aAAa,KAAK;GAClB,QAAQ,KAAA;GACR,UAAU,MAAM;GAChB,WAAW;EACb;EAEA,SAAS,SAAS,MAA2B;GAC3C,MAAM,EAAE,UAAU;GAClB,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,OAAO,cAAc,CAAC,KAAK,SAAS,KAAK,KAAK,aAAa,eAAe,KAAK,MAAM,MAAM,OAAO;GAC1I,IAAI,CAAC,WAAW,QAAQ,QAAQ,cAAc,GAAG,OAAO;GAExD,OAAO,CAAC,MAAM,QAAQ,MAAM,WAAW;IACrC,MAAM,cAAuB,OAAO,SAAS,KAAK;IAClD,OAAO,OAAO,gBAAgB,YAAY,gBAAgB,QAAQ,WAAW,eAAe,YAAY,eAAe,YAAY,WAAW;GAChJ,CAAC;EACH;EAEA,eAAe,QAAQ,MAAkB,UAAkB;GACzD,QAAQ,KAAA;GACR,MAAM,EAAE,UAAU;GAClB,IAAI,qBAAqB,SAAS,KAAK,CAAC,EAAE,aAAa,YAAY,CAAC,SAAS,IAAI,GAAG;GACpF,MAAM,MAAM,MAAM,UAAU;GAC5B,MAAM,YAAY,eAAe,KAAK;GAEtC,MAAM,SAAS,MAAM,IAAI,YAAY,KAAK,IAAI,GAAG,MAAM,mBAAmB,SAAS,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC,mBAAmB,MAAM;GACpI,MAAM,aAAa,IAAI,gBAAgB;GACvC,WAAW;GACX,IAAI;GACJ,IAAI;IACF,OAAO,MAAM,QAAQ,gBAAgB,QAAQ,WAAW,MAAM;GAChE,QAAQ;IAEN;GACF,UAAU;IACR,IAAI,aAAa,YAAY,WAAW;GAC1C;GACA,IAAI,WAAW,OAAO,WAAW,CAAC,QAAQ,KAAK,aAAa;GAG5D,MAAM,MAAM,KAAK;GACjB,IAAI,qBAAqB,SAAS,GAAG,CAAC,EAAE,aAAa,YAAY,CAAC,SAAS,IAAI,KAAK,eAAe,GAAG,MAAM,WAAW;GACvH,KAAK,SAAS,IAAI,GAAG,QAAQ,sBAAsB;IAAE,MAAM;IAAQ,YAAY;KAAE;KAAM,KAAK,IAAI,UAAU;IAAK;GAAE,CAAqB,CAAC;EACzI;EAEA,OAAO,CACL,IAAI,OAAmB;GACrB,KAAK;GACL,OAAO;IACL,aAAa;KAAE,YAAY;KAAM,OAAO;KAAG,UAAU;IAAE;IACvD,MAAM,IAAI,MAAM,UAAU,UAAU;KAClC,MAAM,OAAO,GAAG,QAAQ,oBAAoB;KAE5C,MAAM,SAAS,iBAAiB,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK;KAC/D,MAAM,SAAS,GAAG,cAAc,CAAC;KACjC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;KAClC,IAAI,aAAa,KAAK;KACtB,IAAI,MAAM,SAAS,QAAQ,aAAa,KAAK;UACxC,IAAI,MAAM,SAAS,WAAW,UAAU,OAAO,aAAa;UAC5D,IAAI,cAAc,GAAG,YAAY,aAAa,cAAc,YAAY,IAAI,UAAU,QAAQ;KACnG,IAAI,eAAe,KAAK,cAAc,CAAC,UAAU,CAAC,OAAO,OAAO;KAChE,OAAO;MAAE;MAAY,OAAO,KAAK,SAAS,SAAS,IAAI;MAAI,UAAU,KAAK,YAAY,UAAU,QAAQ,IAAI;KAAG;IACjH;GACF;GACA,OAAO;IACL,YAAY,OAAO;KACjB,MAAM,aAAa,qBAAqB,SAAS,KAAK,CAAC,EAAE;KACzD,IAAI,CAAC,YAAY,OAAO;KACxB,MAAM,SAAS,WAAW,OAAO,WAAW,WAAW;MACrD,MAAM,OAAO,SAAS,cAAc,MAAM;MAC1C,KAAK,YAAY;MACjB,KAAK,kBAAkB;MACvB,KAAK,aAAa,eAAe,MAAM;MACvC,KAAK,cAAc,WAAW;MAC9B,OAAO;KACT,GAAG;MAAE,MAAM;MAAG,KAAK,SAAS,WAAW;MAAQ,iBAAiB;KAAK,CAAC;KACtE,OAAO,cAAc,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC;IACjD;IACA,iBAAiB,EACf,KAAK,MAAM;KACT,OAAO;KACP,IAAI,qBAAqB,SAAS,KAAK,KAAK,CAAC,EAAE,YAC7C,KAAK,SAAS,KAAK,MAAM,GAAG,QAAQ,sBAAsB,EAAE,MAAM,QAAQ,CAAqB,CAAC;KAElG,OAAO;IACT,EACF;GACF;GACA,OAAO,SAAS;IAEd,IAAI,OAAO,SAAS,IAAI,CAAC,CAAC,GAAG;IAC7B,MAAM,OAAO,SAAS,WAAW,UAAU;KACzC,MAAM,UAAU,MAAM,GAAG;KACzB,IAAI,YAAY,MAAM;KACtB,OAAO;KACP,IAAI,WAAW,KAAK,aAAa;KACjC,OAAO;KACP,IAAI,qBAAqB,SAAS,KAAK,KAAK,CAAC,EAAE,YAC7C,KAAK,SAAS,KAAK,MAAM,GAAG,QAAQ,sBAAsB,EAAE,MAAM,QAAQ,CAAqB,CAAC;IAEpG,CAAC;IACD,OAAO;KACL,OAAO,MAAM,WAAW;MACtB,MAAM,OAAO,qBAAqB,SAAS,KAAK,KAAK;MACrD,MAAM,OAAO,qBAAqB,SAAS,SAAS;MACpD,IAAI,CAAC,QAAQ,CAAC,MAAM;MACpB,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,cAAc,OAAO,OAAO;MACnD,IAAI,KAAK,aAAa,KAAK,UAAU;MAErC,OAAO;MAEP,IAAI,KAAK,UAAU,KAAK,SAAS,CAAC,SAAS,IAAI,GAAG;MAClD,MAAM,WAAW,KAAK;MACtB,QAAQ,OAAO,iBAAiB,KAAK,QAAQ,MAAM,QAAQ,GAAG,QAAQ,QAAQ;KAChF;KACA,UAAU;MACR,KAAK;MACL,OAAO;KACT;IACF;GACF;EACF,CAAC,CACH;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AiReview, AiReviewChange, AiReviewChangeSummary, AiReviewDecision, AiReviewHandle, AiReviewHunk, AiReviewOptions, AiReviewOutcome, AiReviewSkipReason, AiReviewState, acceptAiReview, aiReviewKey, rejectAiReview, setActiveAiReviewHunk, startAiReview } from "./ai-review.js";
|
|
2
|
+
import { AGENT_LIMITS, AGENT_OP_OUTCOMES, AGENT_OP_OUTCOME_TEXT, AGENT_OP_TYPES, AGENT_TOOL, AgentOp, AgentOpContext, AgentOpFeedback, AgentOpOutcome, AgentOpProblem, AgentOpProblemReason, AgentOpType, AgentTextOptions, ModelAgentOp, agentFeedbackText, agentOpSummary, agentOpTarget, agentRetryMessage, agentShownMessage, agentUnreadableProblem, checkAgentOps, documentBlockIds } from "./protocol/agent-ops.js";
|
|
3
|
+
import { CHAT_LIMITS, CITATION_HREF_PREFIX, ChatBlock, ChatBlockModel, ChatCompositeKind, DocumentChatMessage, citationBlockId, documentChatMessages } from "./protocol/chat.js";
|
|
4
|
+
import { AI_COMPLETE_LIMITS, AiCompleteMessage, cleanCompletion, completeMessages, completionReady } from "./protocol/complete.js";
|
|
5
|
+
import { AI_LANGUAGE_KEYS, MODEL_REF_LIMITS, MODEL_SLOT_KEYS, ModelProfile, ModelRef, UserModelProfile, modelRefSchema } from "./protocol/models.js";
|
|
6
|
+
import { AI_ID_PATTERN, aiBlockInputSchema, aiBlockSchema } from "./protocol/schemas.js";
|
|
7
|
+
import { AI_LIMITS, AI_TASKS, AI_TASK_IDS, AiApplyMode, AiBlockInput, AiInput, AiMessage, AiTask, AiTaskId, blockTasks, inBlockTasks, withHeading, withTaskHeading } from "./protocol/tasks.js";
|
|
8
|
+
import "./protocol/index.js";
|
|
9
|
+
import { AgentScope, selectionScope } from "./agent-ops.js";
|
|
10
|
+
import { AgentOpReview, AgentOpReviewOptions, AgentOpReviewState, AgentOpState, createAgentOpReview } from "./agent-op-review.js";
|
|
11
|
+
import { AiApplyOutcome, AiResultAction, AiTarget, aiApplyFailure, applyAiResult, captureTarget, documentMarkdown, formatTaskResult, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, rangeMarkdown, resultBlocks, selectionMarkdown } from "./ai-apply.js";
|
|
12
|
+
import { AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, AiMenuAction, aiMenuActionsOf, openAiMenuAtCaret, openAiMenuForSelection } from "./ai-menu.js";
|
|
13
|
+
import { AiSelectionHighlight, aiSelectionHighlightKey, hideAiSelectionHighlight, showAiSelectionHighlight } from "./ai-selection-highlight.js";
|
|
14
|
+
import { AiSseOutcome, postAiSse } from "./ai-sse.js";
|
|
15
|
+
import { AiAssistant, AiAssistantOptions, AiAssistantState, AiRunBody, AiStatus, createAiAssistant } from "./assistant.js";
|
|
16
|
+
import { aiBlockAction, aiSlashCommand, blockTextRange } from "./block-actions.js";
|
|
17
|
+
import { documentChatText } from "./document-chat.js";
|
|
18
|
+
import { DocumentChat, DocumentChatGeneration, DocumentChatOptions, DocumentChatState, DocumentChatTurn, createDocumentChat } from "./document-chat-model.js";
|
|
19
|
+
import { AiUi, aiFeatureCore } from "./feature.js";
|
|
20
|
+
import { GhostAutocompleteOptions, completionFetcher, ghostAutocomplete, ghostAutocompleteKey } from "./ghost-autocomplete.js";
|
|
21
|
+
import { ModelProfilesModel, modelProfiles } from "./model-profiles.js";
|
|
22
|
+
import { isRateLimited, notifyAiRateLimited } from "./rate-limit.js";
|
|
23
|
+
import { AiSidebarFlow, AiSidebarFlowOptions, createAiSidebarFlow } from "./sidebar-flow.js";
|
|
24
|
+
export { AGENT_LIMITS, AGENT_OP_OUTCOMES, AGENT_OP_OUTCOME_TEXT, AGENT_OP_TYPES, AGENT_TOOL, AI_COMPLETE_LIMITS, AI_ID_PATTERN, AI_LANGUAGE_KEYS, AI_LIMITS, AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, AI_TASKS, AI_TASK_IDS, AgentOp, AgentOpContext, AgentOpFeedback, AgentOpOutcome, AgentOpProblem, AgentOpProblemReason, type AgentOpReview, type AgentOpReviewOptions, type AgentOpReviewState, type AgentOpState, AgentOpType, type AgentScope, AgentTextOptions, AiApplyMode, type AiApplyOutcome, type AiAssistant, type AiAssistantOptions, type AiAssistantState, AiBlockInput, AiCompleteMessage, AiInput, type AiMenuAction, AiMessage, type AiResultAction, AiReview, type AiReviewChange, type AiReviewChangeSummary, type AiReviewDecision, type AiReviewHandle, type AiReviewHunk, type AiReviewOptions, type AiReviewOutcome, type AiReviewSkipReason, type AiReviewState, type AiRunBody, AiSelectionHighlight, type AiSidebarFlow, type AiSidebarFlowOptions, type AiSseOutcome, type AiStatus, type AiTarget, AiTask, AiTaskId, type AiUi, CHAT_LIMITS, CITATION_HREF_PREFIX, ChatBlock, ChatBlockModel, ChatCompositeKind, type DocumentChat, type DocumentChatGeneration, DocumentChatMessage, type DocumentChatOptions, type DocumentChatState, type DocumentChatTurn, type GhostAutocompleteOptions, MODEL_REF_LIMITS, MODEL_SLOT_KEYS, ModelAgentOp, ModelProfile, type ModelProfilesModel, ModelRef, UserModelProfile, acceptAiReview, agentFeedbackText, agentOpSummary, agentOpTarget, agentRetryMessage, agentShownMessage, agentUnreadableProblem, aiApplyFailure, aiBlockAction, aiBlockInputSchema, aiBlockSchema, aiFeatureCore, aiMenuActionsOf, aiReviewKey, aiSelectionHighlightKey, aiSlashCommand, applyAiResult, blockTasks, blockTextRange, captureTarget, checkAgentOps, citationBlockId, cleanCompletion, completeMessages, completionFetcher, completionReady, createAgentOpReview, createAiAssistant, createAiSidebarFlow, createDocumentChat, documentBlockIds, documentChatMessages, documentChatText, documentMarkdown, formatTaskResult, ghostAutocomplete, ghostAutocompleteKey, hideAiSelectionHighlight, inBlockTasks, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, isRateLimited, modelProfiles, modelRefSchema, notifyAiRateLimited, openAiMenuAtCaret, openAiMenuForSelection, postAiSse, rangeMarkdown, rejectAiReview, resultBlocks, selectionMarkdown, selectionScope, setActiveAiReviewHunk, showAiSelectionHighlight, startAiReview, withHeading, withTaskHeading };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AGENT_LIMITS, AGENT_OP_OUTCOMES, AGENT_OP_OUTCOME_TEXT, AGENT_OP_TYPES, AGENT_TOOL, agentFeedbackText, agentOpSummary, agentOpTarget, agentRetryMessage, agentShownMessage, agentUnreadableProblem, checkAgentOps, documentBlockIds } from "./protocol/agent-ops.js";
|
|
2
|
+
import { CHAT_LIMITS, CITATION_HREF_PREFIX, citationBlockId, documentChatMessages } from "./protocol/chat.js";
|
|
3
|
+
import { AI_COMPLETE_LIMITS, cleanCompletion, completeMessages, completionReady } from "./protocol/complete.js";
|
|
4
|
+
import { AI_LANGUAGE_KEYS, MODEL_REF_LIMITS, MODEL_SLOT_KEYS, modelRefSchema } from "./protocol/models.js";
|
|
5
|
+
import { AI_LIMITS, AI_TASKS, AI_TASK_IDS, blockTasks, inBlockTasks, withHeading, withTaskHeading } from "./protocol/tasks.js";
|
|
6
|
+
import { AI_ID_PATTERN, aiBlockInputSchema, aiBlockSchema } from "./protocol/schemas.js";
|
|
7
|
+
import { selectionScope } from "./agent-ops.js";
|
|
8
|
+
import { aiApplyFailure, applyAiResult, captureTarget, documentMarkdown, formatTaskResult, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, rangeMarkdown, resultBlocks, selectionMarkdown } from "./ai-apply.js";
|
|
9
|
+
import { AiReview, acceptAiReview, aiReviewKey, rejectAiReview, setActiveAiReviewHunk, startAiReview } from "./ai-review.js";
|
|
10
|
+
import { createAgentOpReview } from "./agent-op-review.js";
|
|
11
|
+
import { AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, aiMenuActionsOf, openAiMenuAtCaret, openAiMenuForSelection } from "./ai-menu.js";
|
|
12
|
+
import { AiSelectionHighlight, aiSelectionHighlightKey, hideAiSelectionHighlight, showAiSelectionHighlight } from "./ai-selection-highlight.js";
|
|
13
|
+
import { isRateLimited, notifyAiRateLimited } from "./rate-limit.js";
|
|
14
|
+
import { postAiSse } from "./ai-sse.js";
|
|
15
|
+
import { createAiAssistant } from "./assistant.js";
|
|
16
|
+
import { aiBlockAction, aiSlashCommand, blockTextRange } from "./block-actions.js";
|
|
17
|
+
import { documentChatText } from "./document-chat.js";
|
|
18
|
+
import { createDocumentChat } from "./document-chat-model.js";
|
|
19
|
+
import { completionFetcher, ghostAutocomplete, ghostAutocompleteKey } from "./ghost-autocomplete.js";
|
|
20
|
+
import { modelProfiles } from "./model-profiles.js";
|
|
21
|
+
import { aiFeatureCore } from "./feature.js";
|
|
22
|
+
import { createAiSidebarFlow } from "./sidebar-flow.js";
|
|
23
|
+
export { AGENT_LIMITS, AGENT_OP_OUTCOMES, AGENT_OP_OUTCOME_TEXT, AGENT_OP_TYPES, AGENT_TOOL, AI_COMPLETE_LIMITS, AI_ID_PATTERN, AI_LANGUAGE_KEYS, AI_LIMITS, AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, AI_TASKS, AI_TASK_IDS, AiReview, AiSelectionHighlight, CHAT_LIMITS, CITATION_HREF_PREFIX, MODEL_REF_LIMITS, MODEL_SLOT_KEYS, acceptAiReview, agentFeedbackText, agentOpSummary, agentOpTarget, agentRetryMessage, agentShownMessage, agentUnreadableProblem, aiApplyFailure, aiBlockAction, aiBlockInputSchema, aiBlockSchema, aiFeatureCore, aiMenuActionsOf, aiReviewKey, aiSelectionHighlightKey, aiSlashCommand, applyAiResult, blockTasks, blockTextRange, captureTarget, checkAgentOps, citationBlockId, cleanCompletion, completeMessages, completionFetcher, completionReady, createAgentOpReview, createAiAssistant, createAiSidebarFlow, createDocumentChat, documentBlockIds, documentChatMessages, documentChatText, documentMarkdown, formatTaskResult, ghostAutocomplete, ghostAutocompleteKey, hideAiSelectionHighlight, inBlockTasks, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, isRateLimited, modelProfiles, modelRefSchema, notifyAiRateLimited, openAiMenuAtCaret, openAiMenuForSelection, postAiSse, rangeMarkdown, rejectAiReview, resultBlocks, selectionMarkdown, selectionScope, setActiveAiReviewHunk, showAiSelectionHighlight, startAiReview, withHeading, withTaskHeading };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ModelSlot } from "../../settings/values.js";
|
|
2
|
+
import "../../settings/index.js";
|
|
3
|
+
import { ReadonlyStore, Store } from "../../core/store.js";
|
|
4
|
+
import { EditorContext } from "../../core/context.js";
|
|
5
|
+
import { ModelProfile, ModelRef, UserModelProfile } from "./protocol/models.js";
|
|
6
|
+
import "./protocol/index.js";
|
|
7
|
+
//#region src/features/ai/model-profiles.d.ts
|
|
8
|
+
/** The model profiles of one app: see `modelProfiles`. */
|
|
9
|
+
export interface ModelProfilesModel {
|
|
10
|
+
/** Server presets (`GET /api/ai/models`, without keys); empty until loaded. */
|
|
11
|
+
presets: ReadonlyStore<ModelProfile[]>;
|
|
12
|
+
/** This browser's own profiles (localStorage). Change them through `saveUserProfile`/`removeUserProfile`. */
|
|
13
|
+
userProfiles: Store<UserModelProfile[]>;
|
|
14
|
+
/** Presets, then user profiles. Reads the stores: call it again after either changed. */
|
|
15
|
+
profiles: () => ModelProfile[];
|
|
16
|
+
/**
|
|
17
|
+
* Profile a slot runs on: the one the settings assign to it, else the server's default preset for the slot, else the
|
|
18
|
+
* first preset; none before the presets loaded (unless the settings point at a user profile).
|
|
19
|
+
*/
|
|
20
|
+
slotProfile: (slot: ModelSlot) => ModelProfile | undefined;
|
|
21
|
+
/** What AI requests send as `model`; works before the presets loaded (the default slot preset of `createEditor({ ai })`). */
|
|
22
|
+
modelRef: (slot: ModelSlot) => ModelRef;
|
|
23
|
+
saveUserProfile: (profile: UserModelProfile) => void;
|
|
24
|
+
/** Also resets every slot that ran on the profile to the server default. */
|
|
25
|
+
removeUserProfile: (id: string) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Model profiles the AI features run on, shared by all editors of the app (cached per `createEditorContext`, never
|
|
29
|
+
* process-global): server presets (`GET /api/ai/models` through the context's HTTP client, requested once on first
|
|
30
|
+
* use, without keys) plus user profiles that live only in this browser's localStorage (their key goes with each
|
|
31
|
+
* request). Framework-free: `modelRef(slot)` is what AI requests send as `model`. Frameworks observe `presets`,
|
|
32
|
+
* `userProfiles` and `app.settings` (the slot assignment is `settings.ai.slots`).
|
|
33
|
+
*/
|
|
34
|
+
export declare function modelProfiles(app: EditorContext): ModelProfilesModel;
|
|
35
|
+
//#endregion
|
|
36
|
+
//# sourceMappingURL=model-profiles.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { MODEL_SLOTS } from "../../settings/values.js";
|
|
2
|
+
import { createStore } from "../../core/store.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/features/ai/model-profiles.ts
|
|
5
|
+
const STORAGE_KEY = "tiptap-editor:model-profiles";
|
|
6
|
+
const storedProfileSchema = z.object({
|
|
7
|
+
id: z.string(),
|
|
8
|
+
label: z.string(),
|
|
9
|
+
endpoint: z.string(),
|
|
10
|
+
model: z.string(),
|
|
11
|
+
apiKey: z.string()
|
|
12
|
+
});
|
|
13
|
+
function storeUserProfiles(profiles) {
|
|
14
|
+
try {
|
|
15
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(profiles));
|
|
16
|
+
} catch {}
|
|
17
|
+
}
|
|
18
|
+
function loadUserProfiles() {
|
|
19
|
+
try {
|
|
20
|
+
const stored = JSON.parse(localStorage.getItem(STORAGE_KEY) ?? "[]");
|
|
21
|
+
if (Array.isArray(stored)) return stored.flatMap((item) => {
|
|
22
|
+
const parsed = storedProfileSchema.safeParse(item);
|
|
23
|
+
return parsed.success ? [parsed.data] : [];
|
|
24
|
+
});
|
|
25
|
+
} catch {}
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
function createModelProfiles(app) {
|
|
29
|
+
const presets = createStore([]);
|
|
30
|
+
const userProfiles = createStore(loadUserProfiles());
|
|
31
|
+
/** Default preset id per slot as the server reports it; until then the app's public AI configuration. */
|
|
32
|
+
let serverSlots = null;
|
|
33
|
+
const defaultSlots = app.ai?.slots ?? {
|
|
34
|
+
complete: "",
|
|
35
|
+
rewrite: "",
|
|
36
|
+
generate: ""
|
|
37
|
+
};
|
|
38
|
+
app.fetch("/api/ai/models").then((response) => {
|
|
39
|
+
serverSlots = response.slots;
|
|
40
|
+
presets.set(response.presets);
|
|
41
|
+
}).catch((error) => {
|
|
42
|
+
console.warn("tiptap-editor: Modell-Presets konnten nicht geladen werden", error);
|
|
43
|
+
});
|
|
44
|
+
const profiles = () => [...presets.get(), ...userProfiles.get().map(({ id, label, endpoint, model }) => ({
|
|
45
|
+
id,
|
|
46
|
+
label,
|
|
47
|
+
endpoint,
|
|
48
|
+
model,
|
|
49
|
+
source: "user"
|
|
50
|
+
}))];
|
|
51
|
+
const slotProfile = (slot) => {
|
|
52
|
+
const chosen = app.settings.get().ai.slots[slot];
|
|
53
|
+
const defaultId = (serverSlots ?? defaultSlots)[slot];
|
|
54
|
+
return profiles().find((p) => p.id === chosen) ?? presets.get().find((p) => p.id === defaultId) ?? presets.get()[0];
|
|
55
|
+
};
|
|
56
|
+
const modelRef = (slot) => {
|
|
57
|
+
const profile = slotProfile(slot);
|
|
58
|
+
if (!profile) return { preset: (serverSlots ?? defaultSlots)[slot] };
|
|
59
|
+
const user = profile.source === "user" ? userProfiles.get().find((p) => p.id === profile.id) : void 0;
|
|
60
|
+
return user ? {
|
|
61
|
+
endpoint: user.endpoint,
|
|
62
|
+
model: user.model,
|
|
63
|
+
apiKey: user.apiKey
|
|
64
|
+
} : { preset: profile.id };
|
|
65
|
+
};
|
|
66
|
+
const saveUserProfile = (profile) => {
|
|
67
|
+
const current = userProfiles.get();
|
|
68
|
+
const index = current.findIndex((p) => p.id === profile.id);
|
|
69
|
+
const next = index < 0 ? [...current, profile] : current.map((p, i) => i === index ? profile : p);
|
|
70
|
+
userProfiles.set(next);
|
|
71
|
+
storeUserProfiles(next);
|
|
72
|
+
};
|
|
73
|
+
const removeUserProfile = (id) => {
|
|
74
|
+
const next = userProfiles.get().filter((p) => p.id !== id);
|
|
75
|
+
userProfiles.set(next);
|
|
76
|
+
storeUserProfiles(next);
|
|
77
|
+
const slots = app.settings.get().ai.slots;
|
|
78
|
+
if (MODEL_SLOTS.some((slot) => slots[slot] === id)) app.settings.update((s) => {
|
|
79
|
+
for (const slot of MODEL_SLOTS) if (s.ai.slots[slot] === id) delete s.ai.slots[slot];
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
presets,
|
|
84
|
+
userProfiles,
|
|
85
|
+
profiles,
|
|
86
|
+
slotProfile,
|
|
87
|
+
modelRef,
|
|
88
|
+
saveUserProfile,
|
|
89
|
+
removeUserProfile
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const models = /* @__PURE__ */ new WeakMap();
|
|
93
|
+
/**
|
|
94
|
+
* Model profiles the AI features run on, shared by all editors of the app (cached per `createEditorContext`, never
|
|
95
|
+
* process-global): server presets (`GET /api/ai/models` through the context's HTTP client, requested once on first
|
|
96
|
+
* use, without keys) plus user profiles that live only in this browser's localStorage (their key goes with each
|
|
97
|
+
* request). Framework-free: `modelRef(slot)` is what AI requests send as `model`. Frameworks observe `presets`,
|
|
98
|
+
* `userProfiles` and `app.settings` (the slot assignment is `settings.ai.slots`).
|
|
99
|
+
*/
|
|
100
|
+
function modelProfiles(app) {
|
|
101
|
+
let model = models.get(app);
|
|
102
|
+
if (!model) {
|
|
103
|
+
model = createModelProfiles(app);
|
|
104
|
+
models.set(app, model);
|
|
105
|
+
}
|
|
106
|
+
return model;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { modelProfiles };
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=model-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-profiles.js","names":[],"sources":["../../../src/features/ai/model-profiles.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { EditorContext } from '../../core/context'\nimport { createStore, type ReadonlyStore, type Store } from '../../core/store'\nimport { MODEL_SLOTS, type ModelSlot } from '../../settings'\nimport type { ModelProfile, ModelRef, UserModelProfile } from './protocol'\n\nconst STORAGE_KEY = 'tiptap-editor:model-profiles'\n\n/** The model profiles of one app: see `modelProfiles`. */\nexport interface ModelProfilesModel {\n /** Server presets (`GET /api/ai/models`, without keys); empty until loaded. */\n presets: ReadonlyStore<ModelProfile[]>\n /** This browser's own profiles (localStorage). Change them through `saveUserProfile`/`removeUserProfile`. */\n userProfiles: Store<UserModelProfile[]>\n /** Presets, then user profiles. Reads the stores: call it again after either changed. */\n profiles: () => ModelProfile[]\n /**\n * Profile a slot runs on: the one the settings assign to it, else the server's default preset for the slot, else the\n * first preset; none before the presets loaded (unless the settings point at a user profile).\n */\n slotProfile: (slot: ModelSlot) => ModelProfile | undefined\n /** What AI requests send as `model`; works before the presets loaded (the default slot preset of `createEditor({ ai })`). */\n modelRef: (slot: ModelSlot) => ModelRef\n saveUserProfile: (profile: UserModelProfile) => void\n /** Also resets every slot that ran on the profile to the server default. */\n removeUserProfile: (id: string) => void\n}\n\nconst storedProfileSchema = z.object({ id: z.string(), label: z.string(), endpoint: z.string(), model: z.string(), apiKey: z.string() })\n\nfunction storeUserProfiles(profiles: UserModelProfile[]) {\n try {\n localStorage.setItem(STORAGE_KEY, JSON.stringify(profiles))\n }\n catch {\n // Storage unavailable (e.g. privacy mode): the profiles last for this session only.\n }\n}\n\nfunction loadUserProfiles(): UserModelProfile[] {\n try {\n const stored: unknown = JSON.parse(localStorage.getItem(STORAGE_KEY) ?? '[]')\n if (Array.isArray(stored)) {\n return stored.flatMap((item) => {\n const parsed = storedProfileSchema.safeParse(item)\n return parsed.success ? [parsed.data] : []\n })\n }\n }\n catch {\n // Unreadable or corrupt storage: no user profiles.\n }\n return []\n}\n\nfunction createModelProfiles(app: EditorContext): ModelProfilesModel {\n const presets = createStore<ModelProfile[]>([])\n const userProfiles = createStore<UserModelProfile[]>(loadUserProfiles())\n /** Default preset id per slot as the server reports it; until then the app's public AI configuration. */\n let serverSlots: Record<ModelSlot, string> | null = null\n const defaultSlots: Record<ModelSlot, string> = app.ai?.slots ?? { complete: '', rewrite: '', generate: '' }\n\n app.fetch<{ presets: ModelProfile[], slots: Record<ModelSlot, string> }>('/api/ai/models')\n .then((response) => {\n serverSlots = response.slots\n presets.set(response.presets)\n })\n .catch((error) => {\n // Requests keep using the default slot presets by id.\n console.warn('tiptap-editor: Modell-Presets konnten nicht geladen werden', error)\n })\n\n const profiles = (): ModelProfile[] => [\n ...presets.get(),\n ...userProfiles.get().map(({ id, label, endpoint, model }) => ({ id, label, endpoint, model, source: 'user' as const })),\n ]\n\n const slotProfile = (slot: ModelSlot): ModelProfile | undefined => {\n const chosen = app.settings.get().ai.slots[slot]\n const defaultId = (serverSlots ?? defaultSlots)[slot]\n return profiles().find(p => p.id === chosen)\n ?? presets.get().find(p => p.id === defaultId)\n ?? presets.get()[0]\n }\n\n const modelRef = (slot: ModelSlot): ModelRef => {\n const profile = slotProfile(slot)\n if (!profile) return { preset: (serverSlots ?? defaultSlots)[slot] }\n const user = profile.source === 'user' ? userProfiles.get().find(p => p.id === profile.id) : undefined\n return user ? { endpoint: user.endpoint, model: user.model, apiKey: user.apiKey } : { preset: profile.id }\n }\n\n const saveUserProfile = (profile: UserModelProfile) => {\n const current = userProfiles.get()\n const index = current.findIndex(p => p.id === profile.id)\n const next = index < 0 ? [...current, profile] : current.map((p, i) => (i === index ? profile : p))\n userProfiles.set(next)\n storeUserProfiles(next)\n }\n\n const removeUserProfile = (id: string) => {\n const next = userProfiles.get().filter(p => p.id !== id)\n userProfiles.set(next)\n storeUserProfiles(next)\n const slots = app.settings.get().ai.slots\n if (MODEL_SLOTS.some(slot => slots[slot] === id)) {\n app.settings.update((s) => {\n for (const slot of MODEL_SLOTS) {\n if (s.ai.slots[slot] === id) delete s.ai.slots[slot]\n }\n })\n }\n }\n\n return { presets, userProfiles, profiles, slotProfile, modelRef, saveUserProfile, removeUserProfile }\n}\n\nconst models = new WeakMap<EditorContext, ModelProfilesModel>()\n\n/**\n * Model profiles the AI features run on, shared by all editors of the app (cached per `createEditorContext`, never\n * process-global): server presets (`GET /api/ai/models` through the context's HTTP client, requested once on first\n * use, without keys) plus user profiles that live only in this browser's localStorage (their key goes with each\n * request). Framework-free: `modelRef(slot)` is what AI requests send as `model`. Frameworks observe `presets`,\n * `userProfiles` and `app.settings` (the slot assignment is `settings.ai.slots`).\n */\nexport function modelProfiles(app: EditorContext): ModelProfilesModel {\n let model = models.get(app)\n if (!model) {\n model = createModelProfiles(app)\n models.set(app, model)\n }\n return model\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DocumentMarkdown } from "../../core/document-markdown.js";
|
|
2
|
+
import { coreSchemaExtensions } from "../../core/schema/index.js";
|
|
3
|
+
//#region src/features/ai/preview-extensions.ts
|
|
4
|
+
/**
|
|
5
|
+
* Extensions of a read-only AI preview next to `editor`: the nodes and marks of its schema without their node views
|
|
6
|
+
* (a preview never needs a composite's or a media block's live view), plus Markdown. Without an editor, the core schema.
|
|
7
|
+
*/
|
|
8
|
+
function previewExtensions(editor) {
|
|
9
|
+
return [...editor ? editor.extensionManager.extensions.filter((extension) => extension.type !== "extension").map((extension) => extension.extend({ addNodeView: void 0 })) : coreSchemaExtensions(), DocumentMarkdown];
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { previewExtensions };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=preview-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-extensions.js","names":[],"sources":["../../../src/features/ai/preview-extensions.ts"],"sourcesContent":["import type { AnyExtension, Editor } from '@tiptap/core'\nimport { DocumentMarkdown } from '../../core/document-markdown'\nimport { coreSchemaExtensions } from '../../core/schema'\n\n/**\n * Extensions of a read-only AI preview next to `editor`: the nodes and marks of its schema without their node views\n * (a preview never needs a composite's or a media block's live view), plus Markdown. Without an editor, the core schema.\n */\nexport function previewExtensions(editor: Editor | undefined): AnyExtension[] {\n const schema = editor\n ? editor.extensionManager.extensions.filter(extension => extension.type !== 'extension').map(extension => extension.extend({ addNodeView: undefined }))\n : coreSchemaExtensions()\n return [...schema, DocumentMarkdown]\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,kBAAkB,QAA4C;CAI5E,OAAO,CAAC,GAHO,SACX,OAAO,iBAAiB,WAAW,QAAO,cAAa,UAAU,SAAS,WAAW,CAAC,CAAC,KAAI,cAAa,UAAU,OAAO,EAAE,aAAa,KAAA,EAAU,CAAC,CAAC,IACpJ,qBAAqB,GACN,gBAAgB;AACrC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Locale } from "../../../i18n/index.js";
|
|
2
|
+
//#region src/features/ai/protocol/agent-ops.d.ts
|
|
3
|
+
/** Name of the tool the chat model calls to propose edits. */
|
|
4
|
+
export declare const AGENT_TOOL = "edit_document";
|
|
5
|
+
/** Per-turn limits: operations, Markdown per operation, IDs in a selection scope; retries after invalid IDs. */
|
|
6
|
+
export declare const AGENT_LIMITS: {
|
|
7
|
+
readonly ops: 50;
|
|
8
|
+
readonly markdown: 8000;
|
|
9
|
+
readonly scope: 5000;
|
|
10
|
+
readonly retries: 2;
|
|
11
|
+
};
|
|
12
|
+
export declare const AGENT_OP_TYPES: readonly ["add", "update", "delete", "convert"];
|
|
13
|
+
export type AgentOpType = typeof AGENT_OP_TYPES[number];
|
|
14
|
+
/**
|
|
15
|
+
* One proposed edit as the model writes it: `update` replaces block `id` by `markdown`, `delete` removes block `id`,
|
|
16
|
+
* `add` inserts `markdown` (one or more blocks) after block `afterId` (`null`: at the start of the document), `convert`
|
|
17
|
+
* turns block `id` into the block type `to` (a `CONVERT_TARGET_IDS` entry or `composite:<kind>`), keeping its content.
|
|
18
|
+
*/
|
|
19
|
+
export type ModelAgentOp = {
|
|
20
|
+
type: 'update';
|
|
21
|
+
id: string;
|
|
22
|
+
markdown: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'delete';
|
|
25
|
+
id: string;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'add';
|
|
28
|
+
afterId: string | null;
|
|
29
|
+
markdown: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'convert';
|
|
32
|
+
id: string;
|
|
33
|
+
to: string;
|
|
34
|
+
};
|
|
35
|
+
/** A checked operation with the conversation-wide ID (`op1`, `op2`, …) that decisions refer to. */
|
|
36
|
+
export type AgentOp = ModelAgentOp & {
|
|
37
|
+
op: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* What became of an operation: decided in the review (`accepted`, `rejected`, `partial` for mixed hunks, `invalid`
|
|
41
|
+
* when its text changed underneath), still `pending`, or never reviewed: the review found nothing to show
|
|
42
|
+
* (`unchanged`, `missing` block, `overlap` with open AI changes, `empty` result), or the client refused it as out of
|
|
43
|
+
* scope (`blocked`).
|
|
44
|
+
*/
|
|
45
|
+
export declare const AGENT_OP_OUTCOMES: readonly ["accepted", "rejected", "partial", "invalid", "pending", "unchanged", "missing", "overlap", "empty", "blocked"];
|
|
46
|
+
export type AgentOpOutcome = typeof AGENT_OP_OUTCOMES[number];
|
|
47
|
+
/** Decision state of an earlier operation, sent with the next user message. */
|
|
48
|
+
export interface AgentOpFeedback {
|
|
49
|
+
op: string;
|
|
50
|
+
type: AgentOpType;
|
|
51
|
+
target: string | null;
|
|
52
|
+
outcome: AgentOpOutcome;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Why an operation was dropped: unknown block ID, ID outside the scope, a missing/invalid field, a block edited twice,
|
|
56
|
+
* too many ops, a `convert` target that is not offered.
|
|
57
|
+
*/
|
|
58
|
+
export type AgentOpProblemReason = 'unknown' | 'scope' | 'field' | 'duplicate' | 'limit' | 'target';
|
|
59
|
+
/** A dropped operation: its 1-based position in the tool call, type and target as far as readable, and the offending ID. */
|
|
60
|
+
export interface AgentOpProblem {
|
|
61
|
+
index: number;
|
|
62
|
+
type: string | null;
|
|
63
|
+
id: string | null;
|
|
64
|
+
reason: AgentOpProblemReason;
|
|
65
|
+
detail: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Where operations may point: `known` IDs of the document; `allowed` the selection scope (null: the whole document);
|
|
69
|
+
* `targets` the block types `convert` may turn a block into; `locale` the language of the problem details (default `de`).
|
|
70
|
+
*/
|
|
71
|
+
export interface AgentOpContext {
|
|
72
|
+
known: (id: string) => boolean;
|
|
73
|
+
allowed: ReadonlySet<string> | null;
|
|
74
|
+
targets: ReadonlySet<string>;
|
|
75
|
+
locale?: Locale;
|
|
76
|
+
}
|
|
77
|
+
/** Block IDs of the chat document text (`[<id>] …` per line, see documentChatText). */
|
|
78
|
+
export declare function documentBlockIds(document: string): Set<string>;
|
|
79
|
+
/** The block an operation targets: `update`/`delete` its `id`, `add` its `afterId` (null: document start). */
|
|
80
|
+
export declare function agentOpTarget(op: ModelAgentOp): string | null;
|
|
81
|
+
/** How an outcome reads for the model, per locale; the chat shows the catalog's `ai.opTitle.*` texts. */
|
|
82
|
+
export declare const AGENT_OP_OUTCOME_TEXT: Record<Locale, Record<AgentOpOutcome, string>>;
|
|
83
|
+
/** Text options of the model-facing functions: `locale` selects the language (default `de`). */
|
|
84
|
+
export interface AgentTextOptions {
|
|
85
|
+
locale?: Locale;
|
|
86
|
+
}
|
|
87
|
+
/** `update Block X`, `add nach Block X`, `add am Dokumentanfang`, `convert Block X → composite:task` (`to` when known); English with `locale: 'en'`. */
|
|
88
|
+
export declare function agentOpSummary(op: {
|
|
89
|
+
type: AgentOpType;
|
|
90
|
+
target: string | null;
|
|
91
|
+
to?: string;
|
|
92
|
+
}, { locale }?: AgentTextOptions): string;
|
|
93
|
+
/**
|
|
94
|
+
* Checks the raw `ops` of `edit_document` calls: every ID must exist and lie in the scope (`add` in a selection scope
|
|
95
|
+
* needs an `afterId` from the selection), fields must be present, a `convert` target must be one of `targets`, and a
|
|
96
|
+
* block is updated, converted or deleted at most once. Returns the valid operations in order and the problems of the others;
|
|
97
|
+
* the problems' `detail` is written in `context.locale` (default `de`).
|
|
98
|
+
*/
|
|
99
|
+
export declare function checkAgentOps(raw: readonly unknown[], context: AgentOpContext): {
|
|
100
|
+
valid: ModelAgentOp[];
|
|
101
|
+
problems: AgentOpProblem[];
|
|
102
|
+
};
|
|
103
|
+
/** The problem for a tool call whose input was no object with the list `ops` (index 0), worded in `locale` (default `de`). */
|
|
104
|
+
export declare function agentUnreadableProblem({ locale }?: AgentTextOptions): AgentOpProblem;
|
|
105
|
+
/**
|
|
106
|
+
* Tool result asking the model to call `tool` (default `edit_document`, the host's own tool name when it exposes the
|
|
107
|
+
* operations under another one) again without the invalid operations' mistakes; worded in `locale` (default `de`).
|
|
108
|
+
* By default nothing was applied and the model resends the whole list; with `partial` the host already shows the
|
|
109
|
+
* valid operations, so the model resends only corrected versions of the listed ones.
|
|
110
|
+
*/
|
|
111
|
+
export declare function agentRetryMessage(problems: readonly AgentOpProblem[], scoped: boolean, { locale, tool, partial }?: AgentTextOptions & {
|
|
112
|
+
tool?: string;
|
|
113
|
+
partial?: boolean;
|
|
114
|
+
}): string;
|
|
115
|
+
/** Tool result of a past `edit_document` call: which operations were shown for review, and how many were dropped; worded in `locale` (default `de`). */
|
|
116
|
+
export declare function agentShownMessage(ops: readonly AgentOp[], dropped: number, { locale }?: AgentTextOptions): string;
|
|
117
|
+
/** „Entscheidungen zu deinen letzten Vorschlägen: op1 (update Block X) abgelehnt; …“ (English with `locale: 'en'`), or '' without feedback. */
|
|
118
|
+
export declare function agentFeedbackText(feedback: readonly AgentOpFeedback[], { locale }?: AgentTextOptions): string;
|
|
119
|
+
//#endregion
|
|
120
|
+
//# sourceMappingURL=agent-ops.d.ts.map
|