@agent-native/core 0.4.5 → 0.5.0-dev.b51eaae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/client.d.ts +7 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +24 -3
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/handlers.d.ts +6 -3
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +45 -39
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/index.d.ts +1 -1
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +2 -2
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/server.d.ts +7 -2
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +54 -14
- package/dist/a2a/server.js.map +1 -1
- package/dist/a2a/task-store.d.ts +6 -6
- package/dist/a2a/task-store.d.ts.map +1 -1
- package/dist/a2a/task-store.js +102 -42
- package/dist/a2a/task-store.js.map +1 -1
- package/dist/a2a/types.d.ts +2 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/action.d.ts +46 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +35 -0
- package/dist/action.js.map +1 -0
- package/dist/adapters/sync/file-sync.js +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/production-agent.d.ts +22 -6
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +336 -123
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +43 -0
- package/dist/agent/run-manager.d.ts.map +1 -0
- package/dist/agent/run-manager.js +358 -0
- package/dist/agent/run-manager.js.map +1 -0
- package/dist/agent/run-store.d.ts +26 -0
- package/dist/agent/run-store.d.ts.map +1 -0
- package/dist/agent/run-store.js +145 -0
- package/dist/agent/run-store.js.map +1 -0
- package/dist/agent/thread-data-builder.d.ts +30 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -0
- package/dist/agent/thread-data-builder.js +88 -0
- package/dist/agent/thread-data-builder.js.map +1 -0
- package/dist/agent/types.d.ts +52 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/application-state/emitter.d.ts +3 -2
- package/dist/application-state/emitter.d.ts.map +1 -1
- package/dist/application-state/emitter.js +14 -4
- package/dist/application-state/emitter.js.map +1 -1
- package/dist/application-state/handlers.d.ts.map +1 -1
- package/dist/application-state/handlers.js +13 -16
- package/dist/application-state/handlers.js.map +1 -1
- package/dist/application-state/script-helpers.d.ts +1 -1
- package/dist/application-state/script-helpers.d.ts.map +1 -1
- package/dist/application-state/script-helpers.js +15 -5
- package/dist/application-state/script-helpers.js.map +1 -1
- package/dist/application-state/store.d.ts +4 -3
- package/dist/application-state/store.d.ts.map +1 -1
- package/dist/application-state/store.js +31 -59
- package/dist/application-state/store.js.map +1 -1
- package/dist/chat-threads/emitter.d.ts +9 -0
- package/dist/chat-threads/emitter.d.ts.map +1 -0
- package/dist/chat-threads/emitter.js +14 -0
- package/dist/chat-threads/emitter.js.map +1 -0
- package/dist/chat-threads/store.d.ts +28 -0
- package/dist/chat-threads/store.d.ts.map +1 -0
- package/dist/chat-threads/store.js +124 -0
- package/dist/chat-threads/store.js.map +1 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +4 -18
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +30 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup-agents.d.ts +11 -0
- package/dist/cli/setup-agents.d.ts.map +1 -0
- package/dist/cli/setup-agents.js +123 -0
- package/dist/cli/setup-agents.js.map +1 -0
- package/dist/client/AgentPanel.d.ts +9 -2
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +466 -29
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +25 -3
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +613 -83
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ClientOnly.d.ts +14 -0
- package/dist/client/ClientOnly.d.ts.map +1 -0
- package/dist/client/ClientOnly.js +17 -0
- package/dist/client/ClientOnly.js.map +1 -0
- package/dist/client/CommandMenu.d.ts +71 -0
- package/dist/client/CommandMenu.d.ts.map +1 -0
- package/dist/client/CommandMenu.js +257 -0
- package/dist/client/CommandMenu.js.map +1 -0
- package/dist/client/DefaultSpinner.d.ts +7 -0
- package/dist/client/DefaultSpinner.d.ts.map +1 -0
- package/dist/client/DefaultSpinner.js +28 -0
- package/dist/client/DefaultSpinner.js.map +1 -0
- package/dist/client/MultiTabAssistantChat.d.ts +34 -2
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +346 -57
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/PoweredByBadge.d.ts.map +1 -1
- package/dist/client/PoweredByBadge.js +2 -1
- package/dist/client/PoweredByBadge.js.map +1 -1
- package/dist/client/active-run-state.d.ts +10 -0
- package/dist/client/active-run-state.d.ts.map +1 -0
- package/dist/client/active-run-state.js +32 -0
- package/dist/client/active-run-state.js.map +1 -0
- package/dist/client/agent-chat-adapter.d.ts +2 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +83 -129
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-chat.js +2 -2
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/components/ApiKeySettings.d.ts +2 -2
- package/dist/client/components/ApiKeySettings.js +4 -4
- package/dist/client/components/ApiKeySettings.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +4 -3
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/composer/MentionPopover.d.ts +26 -0
- package/dist/client/composer/MentionPopover.d.ts.map +1 -0
- package/dist/client/composer/MentionPopover.js +130 -0
- package/dist/client/composer/MentionPopover.js.map +1 -0
- package/dist/client/composer/TiptapComposer.d.ts +19 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -0
- package/dist/client/composer/TiptapComposer.js +415 -0
- package/dist/client/composer/TiptapComposer.js.map +1 -0
- package/dist/client/composer/extensions/FileReference.d.ts +3 -0
- package/dist/client/composer/extensions/FileReference.d.ts.map +1 -0
- package/dist/client/composer/extensions/FileReference.js +36 -0
- package/dist/client/composer/extensions/FileReference.js.map +1 -0
- package/dist/client/composer/extensions/MentionReference.d.ts +3 -0
- package/dist/client/composer/extensions/MentionReference.d.ts.map +1 -0
- package/dist/client/composer/extensions/MentionReference.js +63 -0
- package/dist/client/composer/extensions/MentionReference.js.map +1 -0
- package/dist/client/composer/extensions/SkillReference.d.ts +3 -0
- package/dist/client/composer/extensions/SkillReference.d.ts.map +1 -0
- package/dist/client/composer/extensions/SkillReference.js +40 -0
- package/dist/client/composer/extensions/SkillReference.js.map +1 -0
- package/dist/client/composer/index.d.ts +8 -0
- package/dist/client/composer/index.d.ts.map +1 -0
- package/dist/client/composer/index.js +7 -0
- package/dist/client/composer/index.js.map +1 -0
- package/dist/client/composer/types.d.ts +32 -0
- package/dist/client/composer/types.d.ts.map +1 -0
- package/dist/client/composer/types.js +2 -0
- package/dist/client/composer/types.js.map +1 -0
- package/dist/client/composer/use-file-search.d.ts +6 -0
- package/dist/client/composer/use-file-search.d.ts.map +1 -0
- package/dist/client/composer/use-file-search.js +40 -0
- package/dist/client/composer/use-file-search.js.map +1 -0
- package/dist/client/composer/use-mention-search.d.ts +6 -0
- package/dist/client/composer/use-mention-search.d.ts.map +1 -0
- package/dist/client/composer/use-mention-search.js +39 -0
- package/dist/client/composer/use-mention-search.js.map +1 -0
- package/dist/client/composer/use-skills.d.ts +7 -0
- package/dist/client/composer/use-skills.d.ts.map +1 -0
- package/dist/client/composer/use-skills.js +38 -0
- package/dist/client/composer/use-skills.js.map +1 -0
- package/dist/client/index.d.ts +9 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +8 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/ResourceEditor.d.ts +7 -0
- package/dist/client/resources/ResourceEditor.d.ts.map +1 -0
- package/dist/client/resources/ResourceEditor.js +851 -0
- package/dist/client/resources/ResourceEditor.js.map +1 -0
- package/dist/client/resources/ResourceTree.d.ts +13 -0
- package/dist/client/resources/ResourceTree.d.ts.map +1 -0
- package/dist/client/resources/ResourceTree.js +122 -0
- package/dist/client/resources/ResourceTree.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts +2 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -0
- package/dist/client/resources/ResourcesPanel.js +341 -0
- package/dist/client/resources/ResourcesPanel.js.map +1 -0
- package/dist/client/resources/index.d.ts +5 -0
- package/dist/client/resources/index.d.ts.map +1 -0
- package/dist/client/resources/index.js +5 -0
- package/dist/client/resources/index.js.map +1 -0
- package/dist/client/resources/use-resources.d.ts +45 -0
- package/dist/client/resources/use-resources.d.ts.map +1 -0
- package/dist/client/resources/use-resources.js +102 -0
- package/dist/client/resources/use-resources.js.map +1 -0
- package/dist/client/sse-event-processor.d.ts +50 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -0
- package/dist/client/sse-event-processor.js +267 -0
- package/dist/client/sse-event-processor.js.map +1 -0
- package/dist/client/terminal/AgentTerminal.d.ts +1 -1
- package/dist/client/terminal/AgentTerminal.d.ts.map +1 -1
- package/dist/client/terminal/AgentTerminal.js +11 -6
- package/dist/client/terminal/AgentTerminal.js.map +1 -1
- package/dist/client/use-agent-chat.d.ts +1 -1
- package/dist/client/use-agent-chat.d.ts.map +1 -1
- package/dist/client/use-agent-chat.js +3 -3
- package/dist/client/use-agent-chat.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts +36 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -0
- package/dist/client/use-chat-threads.js +175 -0
- package/dist/client/use-chat-threads.js.map +1 -0
- package/dist/client/use-db-sync.d.ts +35 -0
- package/dist/client/use-db-sync.d.ts.map +1 -0
- package/dist/client/use-db-sync.js +74 -0
- package/dist/client/use-db-sync.js.map +1 -0
- package/dist/client/use-dev-mode.d.ts +4 -2
- package/dist/client/use-dev-mode.d.ts.map +1 -1
- package/dist/client/use-dev-mode.js +39 -12
- package/dist/client/use-dev-mode.js.map +1 -1
- package/dist/client/use-file-sync-status.d.ts +1 -1
- package/dist/client/use-file-sync-status.js +3 -3
- package/dist/client/use-file-sync-status.js.map +1 -1
- package/dist/client/use-session.d.ts +1 -1
- package/dist/client/use-session.js +2 -2
- package/dist/client/use-session.js.map +1 -1
- package/dist/client/useProductionAgent.d.ts +1 -1
- package/dist/client/useProductionAgent.d.ts.map +1 -1
- package/dist/client/useProductionAgent.js +38 -3
- package/dist/client/useProductionAgent.js.map +1 -1
- package/dist/credentials/index.d.ts +18 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +32 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/db/client.d.ts +35 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +248 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +103 -16
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/db/index.d.ts +10 -6
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +10 -4
- package/dist/db/index.js.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +31 -30
- package/dist/db/migrations.js.map +1 -1
- package/dist/db/schema.d.ts +45 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +61 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/deploy/build.js +35 -6
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts +9 -0
- package/dist/deploy/route-discovery.d.ts.map +1 -1
- package/dist/deploy/route-discovery.js +30 -1
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/oauth-tokens/store.d.ts.map +1 -1
- package/dist/oauth-tokens/store.js +43 -81
- package/dist/oauth-tokens/store.js.map +1 -1
- package/dist/resources/emitter.d.ts +13 -0
- package/dist/resources/emitter.d.ts.map +1 -0
- package/dist/resources/emitter.js +32 -0
- package/dist/resources/emitter.js.map +1 -0
- package/dist/resources/handlers.d.ts +45 -0
- package/dist/resources/handlers.d.ts.map +1 -0
- package/dist/resources/handlers.js +219 -0
- package/dist/resources/handlers.js.map +1 -0
- package/dist/resources/index.d.ts +5 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +5 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/script-helpers.d.ts +24 -0
- package/dist/resources/script-helpers.d.ts.map +1 -0
- package/dist/resources/script-helpers.js +36 -0
- package/dist/resources/script-helpers.js.map +1 -0
- package/dist/resources/store.d.ts +35 -0
- package/dist/resources/store.d.ts.map +1 -0
- package/dist/resources/store.js +453 -0
- package/dist/resources/store.js.map +1 -0
- package/dist/scripts/call-agent.d.ts +5 -0
- package/dist/scripts/call-agent.d.ts.map +1 -0
- package/dist/scripts/call-agent.js +107 -0
- package/dist/scripts/call-agent.js.map +1 -0
- package/dist/scripts/core-scripts.d.ts.map +1 -1
- package/dist/scripts/core-scripts.js +2 -0
- package/dist/scripts/core-scripts.js.map +1 -1
- package/dist/scripts/db/exec.d.ts +6 -2
- package/dist/scripts/db/exec.d.ts.map +1 -1
- package/dist/scripts/db/exec.js +127 -36
- package/dist/scripts/db/exec.js.map +1 -1
- package/dist/scripts/db/query.d.ts +7 -2
- package/dist/scripts/db/query.d.ts.map +1 -1
- package/dist/scripts/db/query.js +89 -45
- package/dist/scripts/db/query.js.map +1 -1
- package/dist/scripts/db/schema.d.ts +2 -2
- package/dist/scripts/db/schema.d.ts.map +1 -1
- package/dist/scripts/db/schema.js +145 -6
- package/dist/scripts/db/schema.js.map +1 -1
- package/dist/scripts/db/scoping.d.ts +36 -0
- package/dist/scripts/db/scoping.d.ts.map +1 -0
- package/dist/scripts/db/scoping.js +198 -0
- package/dist/scripts/db/scoping.js.map +1 -0
- package/dist/scripts/dev/index.d.ts +2 -2
- package/dist/scripts/dev/index.js +1 -1
- package/dist/scripts/dev/list-files.d.ts +2 -2
- package/dist/scripts/dev/read-file.d.ts +2 -2
- package/dist/scripts/dev/read-file.js +1 -1
- package/dist/scripts/dev/read-file.js.map +1 -1
- package/dist/scripts/dev/search-files.d.ts +2 -2
- package/dist/scripts/dev/search-files.js +1 -1
- package/dist/scripts/dev/search-files.js.map +1 -1
- package/dist/scripts/dev/shell.d.ts +2 -2
- package/dist/scripts/dev/shell.js +1 -1
- package/dist/scripts/dev/shell.js.map +1 -1
- package/dist/scripts/dev/write-file.d.ts +2 -2
- package/dist/scripts/dev/write-file.js +1 -1
- package/dist/scripts/dev/write-file.js.map +1 -1
- package/dist/scripts/resources/delete.d.ts +10 -0
- package/dist/scripts/resources/delete.d.ts.map +1 -0
- package/dist/scripts/resources/delete.js +38 -0
- package/dist/scripts/resources/delete.js.map +1 -0
- package/dist/scripts/resources/index.d.ts +2 -0
- package/dist/scripts/resources/index.d.ts.map +1 -0
- package/dist/scripts/resources/index.js +8 -0
- package/dist/scripts/resources/index.js.map +1 -0
- package/dist/scripts/resources/list.d.ts +10 -0
- package/dist/scripts/resources/list.d.ts.map +1 -0
- package/dist/scripts/resources/list.js +57 -0
- package/dist/scripts/resources/list.js.map +1 -0
- package/dist/scripts/resources/migrate-learnings.d.ts +10 -0
- package/dist/scripts/resources/migrate-learnings.d.ts.map +1 -0
- package/dist/scripts/resources/migrate-learnings.js +23 -0
- package/dist/scripts/resources/migrate-learnings.js.map +1 -0
- package/dist/scripts/resources/read.d.ts +10 -0
- package/dist/scripts/resources/read.d.ts.map +1 -0
- package/dist/scripts/resources/read.js +59 -0
- package/dist/scripts/resources/read.js.map +1 -0
- package/dist/scripts/resources/write.d.ts +10 -0
- package/dist/scripts/resources/write.d.ts.map +1 -0
- package/dist/scripts/resources/write.js +67 -0
- package/dist/scripts/resources/write.js.map +1 -0
- package/dist/scripts/runner.d.ts +7 -7
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +68 -27
- package/dist/scripts/runner.js.map +1 -1
- package/dist/scripts/utils.d.ts +4 -1
- package/dist/scripts/utils.d.ts.map +1 -1
- package/dist/scripts/utils.js +5 -3
- package/dist/scripts/utils.js.map +1 -1
- package/dist/server/action-discovery.d.ts +40 -0
- package/dist/server/action-discovery.d.ts.map +1 -0
- package/dist/server/action-discovery.js +189 -0
- package/dist/server/action-discovery.js.map +1 -0
- package/dist/server/agent-chat-plugin.d.ts +12 -23
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +1087 -36
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts +16 -0
- package/dist/server/agent-discovery.d.ts.map +1 -0
- package/dist/server/agent-discovery.js +136 -0
- package/dist/server/agent-discovery.js.map +1 -0
- package/dist/server/auth-plugin.d.ts +5 -0
- package/dist/server/auth-plugin.d.ts.map +1 -1
- package/dist/server/auth-plugin.js +12 -1
- package/dist/server/auth-plugin.js.map +1 -1
- package/dist/server/auth.d.ts +3 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +576 -117
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +57 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -0
- package/dist/server/core-routes-plugin.js +125 -0
- package/dist/server/core-routes-plugin.js.map +1 -0
- package/dist/server/create-server.d.ts +4 -4
- package/dist/server/create-server.d.ts.map +1 -1
- package/dist/server/create-server.js +5 -5
- package/dist/server/create-server.js.map +1 -1
- package/dist/server/default-watcher.d.ts +9 -3
- package/dist/server/default-watcher.d.ts.map +1 -1
- package/dist/server/default-watcher.js +26 -6
- package/dist/server/default-watcher.js.map +1 -1
- package/dist/server/google-auth-plugin.js +3 -3
- package/dist/server/google-auth-plugin.js.map +1 -1
- package/dist/server/google-oauth.d.ts +72 -0
- package/dist/server/google-oauth.d.ts.map +1 -0
- package/dist/server/google-oauth.js +187 -0
- package/dist/server/google-oauth.js.map +1 -0
- package/dist/server/index.d.ts +9 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +8 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/oauth-helpers.d.ts +16 -0
- package/dist/server/oauth-helpers.d.ts.map +1 -0
- package/dist/server/oauth-helpers.js +25 -0
- package/dist/server/oauth-helpers.js.map +1 -0
- package/dist/server/poll.d.ts +40 -0
- package/dist/server/poll.d.ts.map +1 -0
- package/dist/server/poll.js +49 -0
- package/dist/server/poll.js.map +1 -0
- package/dist/server/resources-plugin.d.ts +27 -0
- package/dist/server/resources-plugin.d.ts.map +1 -0
- package/dist/server/resources-plugin.js +74 -0
- package/dist/server/resources-plugin.js.map +1 -0
- package/dist/server/script-discovery.d.ts +6 -0
- package/dist/server/script-discovery.d.ts.map +1 -0
- package/dist/server/script-discovery.js +6 -0
- package/dist/server/script-discovery.js.map +1 -0
- package/dist/server/sse.d.ts +1 -1
- package/dist/server/sse.js +1 -1
- package/dist/settings/handlers.d.ts +3 -3
- package/dist/settings/handlers.d.ts.map +1 -1
- package/dist/settings/handlers.js +8 -6
- package/dist/settings/handlers.js.map +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.d.ts.map +1 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/store.d.ts +6 -2
- package/dist/settings/store.d.ts.map +1 -1
- package/dist/settings/store.js +26 -63
- package/dist/settings/store.js.map +1 -1
- package/dist/settings/user-settings.d.ts +3 -2
- package/dist/settings/user-settings.d.ts.map +1 -1
- package/dist/settings/user-settings.js +5 -5
- package/dist/settings/user-settings.js.map +1 -1
- package/dist/tailwind.preset.d.ts +7 -6
- package/dist/tailwind.preset.d.ts.map +1 -1
- package/dist/tailwind.preset.js +18 -1
- package/dist/tailwind.preset.js.map +1 -1
- package/dist/terminal/cli-registry.d.ts +1 -1
- package/dist/terminal/cli-registry.js +3 -3
- package/dist/terminal/cli-registry.js.map +1 -1
- package/dist/terminal/pty-server.d.ts.map +1 -1
- package/dist/terminal/pty-server.js +65 -11
- package/dist/terminal/pty-server.js.map +1 -1
- package/dist/terminal/terminal-plugin.d.ts +2 -2
- package/dist/terminal/terminal-plugin.d.ts.map +1 -1
- package/dist/terminal/terminal-plugin.js +27 -21
- package/dist/terminal/terminal-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +114 -8
- package/dist/vite/client.js.map +1 -1
- package/dist/vite/dev-api-server.d.ts +1 -1
- package/dist/vite/dev-api-server.d.ts.map +1 -1
- package/dist/vite/dev-api-server.js +105 -22
- package/dist/vite/dev-api-server.js.map +1 -1
- package/package.json +22 -6
- package/src/templates/default/.agents/skills/actions/SKILL.md +136 -0
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/files-as-database/SKILL.md +2 -2
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +112 -0
- package/src/templates/default/AGENTS.md +56 -164
- package/src/templates/default/DEVELOPING.md +117 -0
- package/src/templates/default/{scripts → actions}/hello.ts +1 -1
- package/src/templates/default/actions/navigate.ts +53 -0
- package/src/templates/default/actions/view-screen.ts +39 -0
- package/src/templates/default/app/global.css +2 -2
- package/src/templates/default/app/root.tsx +19 -16
- package/src/templates/default/app/routes/_index.tsx +1 -1
- package/src/templates/default/package.json +4 -0
- package/src/templates/default/server/plugins/.gitkeep +0 -0
- package/dist/a2a/middleware.d.ts +0 -3
- package/dist/a2a/middleware.d.ts.map +0 -1
- package/dist/a2a/middleware.js +0 -36
- package/dist/a2a/middleware.js.map +0 -1
- package/dist/client/use-file-watcher.d.ts +0 -23
- package/dist/client/use-file-watcher.d.ts.map +0 -1
- package/dist/client/use-file-watcher.js +0 -50
- package/dist/client/use-file-watcher.js.map +0 -1
- package/src/templates/default/.agents/skills/scripts/SKILL.md +0 -121
- package/src/templates/default/.agents/skills/sse-file-watcher/SKILL.md +0 -80
- package/src/templates/default/server/plugins/agent-chat.ts +0 -1
- package/src/templates/default/server/plugins/auth.ts +0 -1
- package/src/templates/default/server/plugins/file-sync.ts +0 -1
- package/src/templates/default/server/plugins/terminal.ts +0 -1
- package/src/templates/default/server/routes/api/events.get.ts +0 -3
- package/src/templates/default/server/routes/api/file-sync/status.get.ts +0 -4
- /package/src/templates/default/{scripts → actions}/run.ts +0 -0
|
@@ -0,0 +1,851 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect, useCallback, useMemo, } from "react";
|
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react";
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
5
|
+
import Placeholder from "@tiptap/extension-placeholder";
|
|
6
|
+
import Link from "@tiptap/extension-link";
|
|
7
|
+
import { Markdown } from "tiptap-markdown";
|
|
8
|
+
import { cn } from "../utils.js";
|
|
9
|
+
const CONTROL_STYLE = { fontSize: 12, lineHeight: 1 };
|
|
10
|
+
const VIEW_PREF_KEY = "resource-editor-view";
|
|
11
|
+
function getViewPref() {
|
|
12
|
+
try {
|
|
13
|
+
const v = localStorage.getItem(VIEW_PREF_KEY);
|
|
14
|
+
if (v === "code")
|
|
15
|
+
return "code";
|
|
16
|
+
}
|
|
17
|
+
catch { }
|
|
18
|
+
return "visual";
|
|
19
|
+
}
|
|
20
|
+
function setViewPref(v) {
|
|
21
|
+
try {
|
|
22
|
+
localStorage.setItem(VIEW_PREF_KEY, v);
|
|
23
|
+
}
|
|
24
|
+
catch { }
|
|
25
|
+
}
|
|
26
|
+
function parseFrontmatter(content) {
|
|
27
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);
|
|
28
|
+
if (!match)
|
|
29
|
+
return { frontmatter: null, body: content };
|
|
30
|
+
const raw = match[0];
|
|
31
|
+
const yamlBlock = match[1];
|
|
32
|
+
const body = content.slice(raw.length);
|
|
33
|
+
// Parse simple key: value pairs (handles multiline >- syntax)
|
|
34
|
+
const fields = [];
|
|
35
|
+
const lines = yamlBlock.split("\n");
|
|
36
|
+
let i = 0;
|
|
37
|
+
while (i < lines.length) {
|
|
38
|
+
const line = lines[i];
|
|
39
|
+
const kvMatch = line.match(/^(\w[\w-]*):\s*(.*)/);
|
|
40
|
+
if (kvMatch) {
|
|
41
|
+
let value = kvMatch[2].trim();
|
|
42
|
+
// Handle YAML multiline indicators (>- or |)
|
|
43
|
+
if (value === ">-" || value === ">" || value === "|" || value === "|-") {
|
|
44
|
+
const multiLines = [];
|
|
45
|
+
i++;
|
|
46
|
+
while (i < lines.length && /^\s+/.test(lines[i])) {
|
|
47
|
+
multiLines.push(lines[i].trim());
|
|
48
|
+
i++;
|
|
49
|
+
}
|
|
50
|
+
value = multiLines.join(" ");
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
i++;
|
|
54
|
+
}
|
|
55
|
+
fields.push({ key: kvMatch[1], value });
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
i++;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return { frontmatter: { raw, fields }, body };
|
|
62
|
+
}
|
|
63
|
+
function serializeFrontmatter(fields) {
|
|
64
|
+
const lines = fields.map(({ key, value }) => {
|
|
65
|
+
// Use multiline >- for long descriptions
|
|
66
|
+
if (key === "description" && value.length > 60) {
|
|
67
|
+
const words = value.split(" ");
|
|
68
|
+
const wrapped = [];
|
|
69
|
+
let line = "";
|
|
70
|
+
for (const w of words) {
|
|
71
|
+
if (line && line.length + w.length + 1 > 72) {
|
|
72
|
+
wrapped.push(" " + line);
|
|
73
|
+
line = w;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
line = line ? line + " " + w : w;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (line)
|
|
80
|
+
wrapped.push(" " + line);
|
|
81
|
+
return `${key}: >-\n${wrapped.join("\n")}`;
|
|
82
|
+
}
|
|
83
|
+
return `${key}: ${value}`;
|
|
84
|
+
});
|
|
85
|
+
return "---\n" + lines.join("\n") + "\n---\n";
|
|
86
|
+
}
|
|
87
|
+
const FM_INPUT_STYLE = {
|
|
88
|
+
background: "transparent",
|
|
89
|
+
border: "none",
|
|
90
|
+
outline: "none",
|
|
91
|
+
color: "inherit",
|
|
92
|
+
fontSize: "inherit",
|
|
93
|
+
fontFamily: "inherit",
|
|
94
|
+
width: "100%",
|
|
95
|
+
padding: 0,
|
|
96
|
+
};
|
|
97
|
+
function FrontmatterBar({ frontmatter, onChange, }) {
|
|
98
|
+
const getField = (key) => frontmatter.fields.find((f) => f.key === key)?.value ?? "";
|
|
99
|
+
const updateField = (key, value) => {
|
|
100
|
+
const exists = frontmatter.fields.some((f) => f.key === key);
|
|
101
|
+
const newFields = exists
|
|
102
|
+
? frontmatter.fields.map((f) => (f.key === key ? { ...f, value } : f))
|
|
103
|
+
: [...frontmatter.fields, { key, value }];
|
|
104
|
+
const updated = {
|
|
105
|
+
...frontmatter,
|
|
106
|
+
raw: serializeFrontmatter(newFields),
|
|
107
|
+
fields: newFields,
|
|
108
|
+
};
|
|
109
|
+
onChange(updated);
|
|
110
|
+
};
|
|
111
|
+
const name = getField("name");
|
|
112
|
+
const description = getField("description");
|
|
113
|
+
const isUserInvocable = getField("user-invocable") === "true";
|
|
114
|
+
return (_jsxs("div", { style: {
|
|
115
|
+
padding: "8px 12px",
|
|
116
|
+
marginBottom: 8,
|
|
117
|
+
borderRadius: 6,
|
|
118
|
+
background: "hsl(var(--muted) / 0.5)",
|
|
119
|
+
border: "1px solid hsl(var(--border) / 0.5)",
|
|
120
|
+
fontSize: 12,
|
|
121
|
+
lineHeight: 1.5,
|
|
122
|
+
color: "hsl(var(--muted-foreground))",
|
|
123
|
+
}, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [_jsx("input", { value: name, onChange: (e) => updateField("name", e.target.value), placeholder: "Skill name", style: {
|
|
124
|
+
...FM_INPUT_STYLE,
|
|
125
|
+
fontWeight: 600,
|
|
126
|
+
color: "hsl(var(--foreground))",
|
|
127
|
+
fontSize: 13,
|
|
128
|
+
flex: 1,
|
|
129
|
+
} }), _jsxs("label", { style: {
|
|
130
|
+
display: "flex",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
gap: 4,
|
|
133
|
+
fontSize: 10,
|
|
134
|
+
cursor: "pointer",
|
|
135
|
+
whiteSpace: "nowrap",
|
|
136
|
+
userSelect: "none",
|
|
137
|
+
padding: "1px 5px",
|
|
138
|
+
borderRadius: 3,
|
|
139
|
+
background: isUserInvocable
|
|
140
|
+
? "hsl(var(--primary) / 0.15)"
|
|
141
|
+
: "transparent",
|
|
142
|
+
color: isUserInvocable
|
|
143
|
+
? "hsl(var(--primary))"
|
|
144
|
+
: "hsl(var(--muted-foreground))",
|
|
145
|
+
border: isUserInvocable ? "none" : "1px dashed hsl(var(--border))",
|
|
146
|
+
fontWeight: 500,
|
|
147
|
+
}, children: [_jsx("input", { type: "checkbox", checked: isUserInvocable, onChange: (e) => updateField("user-invocable", e.target.checked ? "true" : "false"), style: { display: "none" } }), "/", name || "command"] })] }), _jsx("input", { value: description, onChange: (e) => updateField("description", e.target.value), placeholder: "Description \u2014 what this skill does", style: {
|
|
148
|
+
...FM_INPUT_STYLE,
|
|
149
|
+
marginTop: 2,
|
|
150
|
+
opacity: 0.8,
|
|
151
|
+
color: "hsl(var(--muted-foreground))",
|
|
152
|
+
} })] }));
|
|
153
|
+
}
|
|
154
|
+
const slashCommands = [
|
|
155
|
+
{
|
|
156
|
+
title: "Text",
|
|
157
|
+
description: "Plain text",
|
|
158
|
+
icon: "T",
|
|
159
|
+
action: (editor) => editor.chain().focus().setParagraph().run(),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
title: "Heading 1",
|
|
163
|
+
description: "Large heading",
|
|
164
|
+
icon: "H1",
|
|
165
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
title: "Heading 2",
|
|
169
|
+
description: "Medium heading",
|
|
170
|
+
icon: "H2",
|
|
171
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: "Heading 3",
|
|
175
|
+
description: "Small heading",
|
|
176
|
+
icon: "H3",
|
|
177
|
+
action: (editor) => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
title: "Bullet List",
|
|
181
|
+
description: "Unordered list",
|
|
182
|
+
icon: "•",
|
|
183
|
+
action: (editor) => editor.chain().focus().toggleBulletList().run(),
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
title: "Numbered List",
|
|
187
|
+
description: "Ordered list",
|
|
188
|
+
icon: "1.",
|
|
189
|
+
action: (editor) => editor.chain().focus().toggleOrderedList().run(),
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
title: "Code Block",
|
|
193
|
+
description: "Code snippet",
|
|
194
|
+
icon: "<>",
|
|
195
|
+
action: (editor) => editor.chain().focus().toggleCodeBlock().run(),
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
title: "Quote",
|
|
199
|
+
description: "Block quote",
|
|
200
|
+
icon: '"',
|
|
201
|
+
action: (editor) => editor.chain().focus().toggleBlockquote().run(),
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: "Divider",
|
|
205
|
+
description: "Horizontal rule",
|
|
206
|
+
icon: "—",
|
|
207
|
+
action: (editor) => editor.chain().focus().setHorizontalRule().run(),
|
|
208
|
+
},
|
|
209
|
+
];
|
|
210
|
+
function SlashMenu({ editor }) {
|
|
211
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
212
|
+
const [query, setQuery] = useState("");
|
|
213
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
214
|
+
const [position, setPosition] = useState(null);
|
|
215
|
+
const slashPosRef = useRef(null);
|
|
216
|
+
const menuRef = useRef(null);
|
|
217
|
+
const filteredCommands = useMemo(() => slashCommands.filter((cmd) => cmd.title.toLowerCase().includes(query.toLowerCase()) ||
|
|
218
|
+
cmd.description.toLowerCase().includes(query.toLowerCase())), [query]);
|
|
219
|
+
const executeCommand = useCallback((cmd) => {
|
|
220
|
+
if (slashPosRef.current !== null) {
|
|
221
|
+
const { from } = editor.state.selection;
|
|
222
|
+
editor
|
|
223
|
+
.chain()
|
|
224
|
+
.focus()
|
|
225
|
+
.deleteRange({ from: slashPosRef.current, to: from })
|
|
226
|
+
.run();
|
|
227
|
+
}
|
|
228
|
+
cmd.action(editor);
|
|
229
|
+
setIsOpen(false);
|
|
230
|
+
setQuery("");
|
|
231
|
+
slashPosRef.current = null;
|
|
232
|
+
}, [editor]);
|
|
233
|
+
useEffect(() => {
|
|
234
|
+
if (!editor)
|
|
235
|
+
return;
|
|
236
|
+
const handleKeyDown = (e) => {
|
|
237
|
+
if (!isOpen)
|
|
238
|
+
return;
|
|
239
|
+
if (e.key === "ArrowDown") {
|
|
240
|
+
e.preventDefault();
|
|
241
|
+
setSelectedIndex((i) => (i + 1) % filteredCommands.length);
|
|
242
|
+
}
|
|
243
|
+
else if (e.key === "ArrowUp") {
|
|
244
|
+
e.preventDefault();
|
|
245
|
+
setSelectedIndex((i) => (i - 1 + filteredCommands.length) % filteredCommands.length);
|
|
246
|
+
}
|
|
247
|
+
else if (e.key === "Enter") {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
if (filteredCommands[selectedIndex]) {
|
|
250
|
+
executeCommand(filteredCommands[selectedIndex]);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
else if (e.key === "Escape") {
|
|
254
|
+
setIsOpen(false);
|
|
255
|
+
setQuery("");
|
|
256
|
+
slashPosRef.current = null;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
document.addEventListener("keydown", handleKeyDown, true);
|
|
260
|
+
return () => document.removeEventListener("keydown", handleKeyDown, true);
|
|
261
|
+
}, [isOpen, selectedIndex, filteredCommands, executeCommand, editor]);
|
|
262
|
+
useEffect(() => {
|
|
263
|
+
if (!editor)
|
|
264
|
+
return;
|
|
265
|
+
const handleTransaction = () => {
|
|
266
|
+
const { state } = editor;
|
|
267
|
+
const { from } = state.selection;
|
|
268
|
+
const textBefore = state.doc.textBetween(Math.max(0, from - 20), from, "\n");
|
|
269
|
+
const slashMatch = textBefore.match(/\/([a-zA-Z0-9]*)$/);
|
|
270
|
+
if (slashMatch) {
|
|
271
|
+
const slashStart = from - slashMatch[0].length;
|
|
272
|
+
slashPosRef.current = slashStart;
|
|
273
|
+
setQuery(slashMatch[1]);
|
|
274
|
+
setSelectedIndex(0);
|
|
275
|
+
const coords = editor.view.coordsAtPos(from);
|
|
276
|
+
// Estimate menu height (~320px max) and check if it fits below
|
|
277
|
+
const menuHeight = 320;
|
|
278
|
+
const spaceBelow = window.innerHeight - coords.bottom;
|
|
279
|
+
const flipUp = spaceBelow < menuHeight && coords.top > menuHeight;
|
|
280
|
+
setPosition({
|
|
281
|
+
top: flipUp ? coords.top : coords.bottom + 4,
|
|
282
|
+
left: Math.min(coords.left, window.innerWidth - 240),
|
|
283
|
+
flipUp,
|
|
284
|
+
});
|
|
285
|
+
setIsOpen(true);
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
if (isOpen) {
|
|
289
|
+
setIsOpen(false);
|
|
290
|
+
setQuery("");
|
|
291
|
+
slashPosRef.current = null;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
editor.on("transaction", handleTransaction);
|
|
296
|
+
return () => {
|
|
297
|
+
editor.off("transaction", handleTransaction);
|
|
298
|
+
};
|
|
299
|
+
}, [editor, isOpen]);
|
|
300
|
+
if (!isOpen || !position || filteredCommands.length === 0)
|
|
301
|
+
return null;
|
|
302
|
+
return (_jsx("div", { ref: menuRef, style: {
|
|
303
|
+
position: "fixed",
|
|
304
|
+
...(position.flipUp
|
|
305
|
+
? { bottom: window.innerHeight - position.top + 4 }
|
|
306
|
+
: { top: position.top }),
|
|
307
|
+
left: position.left,
|
|
308
|
+
zIndex: 9999,
|
|
309
|
+
}, className: "re-slash-menu", children: _jsxs("div", { className: "py-1", children: [_jsx("div", { style: {
|
|
310
|
+
padding: "4px 10px",
|
|
311
|
+
fontSize: 10,
|
|
312
|
+
fontWeight: 600,
|
|
313
|
+
textTransform: "uppercase",
|
|
314
|
+
letterSpacing: "0.06em",
|
|
315
|
+
opacity: 0.5,
|
|
316
|
+
}, children: "Blocks" }), filteredCommands.map((cmd, i) => (_jsxs("button", { onClick: () => executeCommand(cmd), onMouseEnter: () => setSelectedIndex(i), className: cn("re-slash-item", i === selectedIndex && "re-slash-item--active"), children: [_jsx("span", { className: "re-slash-icon", children: cmd.icon }), _jsxs("span", { children: [_jsx("span", { className: "re-slash-title", children: cmd.title }), _jsx("span", { className: "re-slash-desc", children: cmd.description })] })] }, cmd.title)))] }) }));
|
|
317
|
+
}
|
|
318
|
+
// --- Inline Bubble Toolbar ---
|
|
319
|
+
function InlineBubbleToolbar({ editor }) {
|
|
320
|
+
const [visible, setVisible] = useState(false);
|
|
321
|
+
const [coords, setCoords] = useState({ top: 0, left: 0 });
|
|
322
|
+
const [showLinkInput, setShowLinkInput] = useState(false);
|
|
323
|
+
const [linkUrl, setLinkUrl] = useState("");
|
|
324
|
+
const toolbarRef = useRef(null);
|
|
325
|
+
useEffect(() => {
|
|
326
|
+
if (!editor)
|
|
327
|
+
return;
|
|
328
|
+
const update = () => {
|
|
329
|
+
const { from, to } = editor.state.selection;
|
|
330
|
+
if (from === to || !editor.isFocused) {
|
|
331
|
+
setVisible(false);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const domSelection = window.getSelection();
|
|
335
|
+
if (!domSelection || domSelection.rangeCount === 0) {
|
|
336
|
+
setVisible(false);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
const range = domSelection.getRangeAt(0);
|
|
340
|
+
const rect = range.getBoundingClientRect();
|
|
341
|
+
if (rect.width === 0) {
|
|
342
|
+
setVisible(false);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
// Use fixed positioning with viewport coordinates
|
|
346
|
+
setCoords({
|
|
347
|
+
top: rect.top - 8,
|
|
348
|
+
left: rect.left + rect.width / 2,
|
|
349
|
+
});
|
|
350
|
+
setVisible(true);
|
|
351
|
+
};
|
|
352
|
+
editor.on("selectionUpdate", update);
|
|
353
|
+
const onBlur = () => {
|
|
354
|
+
// Delay so clicks on toolbar buttons register before hiding
|
|
355
|
+
setTimeout(() => {
|
|
356
|
+
if (!editor.isFocused)
|
|
357
|
+
setVisible(false);
|
|
358
|
+
}, 150);
|
|
359
|
+
};
|
|
360
|
+
editor.on("blur", onBlur);
|
|
361
|
+
return () => {
|
|
362
|
+
editor.off("selectionUpdate", update);
|
|
363
|
+
editor.off("blur", onBlur);
|
|
364
|
+
};
|
|
365
|
+
}, [editor]);
|
|
366
|
+
const handleSetLink = () => {
|
|
367
|
+
if (linkUrl.trim()) {
|
|
368
|
+
editor
|
|
369
|
+
.chain()
|
|
370
|
+
.focus()
|
|
371
|
+
.extendMarkRange("link")
|
|
372
|
+
.setLink({ href: linkUrl.trim() })
|
|
373
|
+
.run();
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
377
|
+
}
|
|
378
|
+
setShowLinkInput(false);
|
|
379
|
+
setLinkUrl("");
|
|
380
|
+
};
|
|
381
|
+
const toggleLink = () => {
|
|
382
|
+
if (editor.isActive("link")) {
|
|
383
|
+
editor.chain().focus().unsetLink().run();
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
const previousUrl = editor.getAttributes("link").href || "";
|
|
387
|
+
setLinkUrl(previousUrl);
|
|
388
|
+
setShowLinkInput(true);
|
|
389
|
+
};
|
|
390
|
+
const items = [
|
|
391
|
+
{
|
|
392
|
+
label: "B",
|
|
393
|
+
title: "Bold",
|
|
394
|
+
action: () => editor.chain().focus().toggleBold().run(),
|
|
395
|
+
isActive: () => editor.isActive("bold"),
|
|
396
|
+
style: { fontWeight: 700 },
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
label: "I",
|
|
400
|
+
title: "Italic",
|
|
401
|
+
action: () => editor.chain().focus().toggleItalic().run(),
|
|
402
|
+
isActive: () => editor.isActive("italic"),
|
|
403
|
+
style: { fontStyle: "italic" },
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
label: "S",
|
|
407
|
+
title: "Strikethrough",
|
|
408
|
+
action: () => editor.chain().focus().toggleStrike().run(),
|
|
409
|
+
isActive: () => editor.isActive("strike"),
|
|
410
|
+
style: { textDecoration: "line-through" },
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
label: "<>",
|
|
414
|
+
title: "Code",
|
|
415
|
+
action: () => editor.chain().focus().toggleCode().run(),
|
|
416
|
+
isActive: () => editor.isActive("code"),
|
|
417
|
+
style: { fontFamily: "monospace", fontSize: 11 },
|
|
418
|
+
},
|
|
419
|
+
{ type: "divider" },
|
|
420
|
+
{
|
|
421
|
+
label: "H1",
|
|
422
|
+
title: "Heading 1",
|
|
423
|
+
action: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
424
|
+
isActive: () => editor.isActive("heading", { level: 1 }),
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
label: "H2",
|
|
428
|
+
title: "Heading 2",
|
|
429
|
+
action: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
430
|
+
isActive: () => editor.isActive("heading", { level: 2 }),
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
label: "H3",
|
|
434
|
+
title: "Heading 3",
|
|
435
|
+
action: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
436
|
+
isActive: () => editor.isActive("heading", { level: 3 }),
|
|
437
|
+
},
|
|
438
|
+
{ type: "divider" },
|
|
439
|
+
{
|
|
440
|
+
label: "🔗",
|
|
441
|
+
title: "Link",
|
|
442
|
+
action: toggleLink,
|
|
443
|
+
isActive: () => editor.isActive("link"),
|
|
444
|
+
},
|
|
445
|
+
];
|
|
446
|
+
if (!visible)
|
|
447
|
+
return null;
|
|
448
|
+
return (_jsx("div", { ref: toolbarRef, className: "re-bubble-toolbar", onMouseDown: (e) => e.preventDefault(), style: {
|
|
449
|
+
position: "fixed",
|
|
450
|
+
top: coords.top,
|
|
451
|
+
left: coords.left,
|
|
452
|
+
transform: "translate(-50%, -100%)",
|
|
453
|
+
zIndex: 9999,
|
|
454
|
+
}, children: showLinkInput ? (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 4, padding: 4 }, onMouseDown: (e) => e.preventDefault(), children: [_jsx("input", { autoFocus: true, type: "url", placeholder: "Paste link...", value: linkUrl, onChange: (e) => setLinkUrl(e.target.value), onKeyDown: (e) => {
|
|
455
|
+
if (e.key === "Enter")
|
|
456
|
+
handleSetLink();
|
|
457
|
+
if (e.key === "Escape") {
|
|
458
|
+
setShowLinkInput(false);
|
|
459
|
+
setLinkUrl("");
|
|
460
|
+
}
|
|
461
|
+
}, style: {
|
|
462
|
+
background: "transparent",
|
|
463
|
+
border: "none",
|
|
464
|
+
outline: "none",
|
|
465
|
+
color: "white",
|
|
466
|
+
fontSize: 12,
|
|
467
|
+
width: 160,
|
|
468
|
+
padding: "2px 4px",
|
|
469
|
+
} }), _jsx("button", { onClick: handleSetLink, style: {
|
|
470
|
+
fontSize: 11,
|
|
471
|
+
color: "#60a5fa",
|
|
472
|
+
padding: "2px 6px",
|
|
473
|
+
fontWeight: 500,
|
|
474
|
+
background: "none",
|
|
475
|
+
border: "none",
|
|
476
|
+
cursor: "pointer",
|
|
477
|
+
}, children: "Apply" })] })) : (_jsx("div", { style: { display: "flex", alignItems: "center", gap: 2 }, onMouseDown: (e) => e.preventDefault(), children: items.map((item, i) => {
|
|
478
|
+
if ("type" in item && item.type === "divider") {
|
|
479
|
+
return (_jsx("div", { style: {
|
|
480
|
+
width: 1,
|
|
481
|
+
height: 16,
|
|
482
|
+
background: "rgba(255,255,255,0.2)",
|
|
483
|
+
margin: "0 2px",
|
|
484
|
+
} }, `d-${i}`));
|
|
485
|
+
}
|
|
486
|
+
const { label, title, action, isActive, style } = item;
|
|
487
|
+
return (_jsx("button", { onClick: action, title: title, className: cn("re-bubble-btn", isActive() && "re-bubble-btn--active"), style: style, children: label }, title));
|
|
488
|
+
}) })) }));
|
|
489
|
+
}
|
|
490
|
+
// --- Visual Markdown Editor ---
|
|
491
|
+
function VisualMarkdownEditor({ content, onChange, resourceId, }) {
|
|
492
|
+
const isSettingContent = useRef(false);
|
|
493
|
+
const onChangeRef = useRef(onChange);
|
|
494
|
+
onChangeRef.current = onChange;
|
|
495
|
+
// Parse frontmatter — strip it from tiptap content, re-prepend on save
|
|
496
|
+
const parsed = useMemo(() => parseFrontmatter(content), [content]);
|
|
497
|
+
const frontmatterRef = useRef(parsed.frontmatter);
|
|
498
|
+
frontmatterRef.current = parsed.frontmatter;
|
|
499
|
+
const editor = useEditor({
|
|
500
|
+
extensions: [
|
|
501
|
+
StarterKit.configure({
|
|
502
|
+
heading: { levels: [1, 2, 3] },
|
|
503
|
+
codeBlock: {},
|
|
504
|
+
dropcursor: { color: "hsl(var(--ring))", width: 2 },
|
|
505
|
+
}),
|
|
506
|
+
Placeholder.configure({
|
|
507
|
+
placeholder: ({ node }) => {
|
|
508
|
+
if (node.type.name === "heading") {
|
|
509
|
+
const level = node.attrs.level;
|
|
510
|
+
if (level === 1)
|
|
511
|
+
return "Heading 1";
|
|
512
|
+
if (level === 2)
|
|
513
|
+
return "Heading 2";
|
|
514
|
+
return "Heading 3";
|
|
515
|
+
}
|
|
516
|
+
return "Type '/' for commands...";
|
|
517
|
+
},
|
|
518
|
+
showOnlyWhenEditable: true,
|
|
519
|
+
showOnlyCurrent: true,
|
|
520
|
+
}),
|
|
521
|
+
Link.configure({
|
|
522
|
+
openOnClick: false,
|
|
523
|
+
HTMLAttributes: { class: "re-link" },
|
|
524
|
+
}),
|
|
525
|
+
Markdown.configure({
|
|
526
|
+
html: true,
|
|
527
|
+
transformPastedText: true,
|
|
528
|
+
transformCopiedText: true,
|
|
529
|
+
}),
|
|
530
|
+
],
|
|
531
|
+
content: parsed.body,
|
|
532
|
+
editorProps: {
|
|
533
|
+
attributes: {
|
|
534
|
+
class: "re-prose",
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
onUpdate: ({ editor }) => {
|
|
538
|
+
if (isSettingContent.current)
|
|
539
|
+
return;
|
|
540
|
+
try {
|
|
541
|
+
const md = editor.storage.markdown.getMarkdown();
|
|
542
|
+
// Re-prepend frontmatter if it existed
|
|
543
|
+
const fm = frontmatterRef.current;
|
|
544
|
+
const full = fm ? fm.raw + md : md;
|
|
545
|
+
onChangeRef.current(full);
|
|
546
|
+
}
|
|
547
|
+
catch (err) {
|
|
548
|
+
console.error("Markdown serialization error:", err);
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
});
|
|
552
|
+
useEffect(() => {
|
|
553
|
+
if (!editor || editor.isDestroyed)
|
|
554
|
+
return;
|
|
555
|
+
const currentMd = editor.storage.markdown.getMarkdown();
|
|
556
|
+
if (currentMd !== parsed.body) {
|
|
557
|
+
if (editor.isFocused)
|
|
558
|
+
return;
|
|
559
|
+
isSettingContent.current = true;
|
|
560
|
+
editor.commands.setContent(parsed.body);
|
|
561
|
+
isSettingContent.current = false;
|
|
562
|
+
}
|
|
563
|
+
}, [parsed.body, editor]);
|
|
564
|
+
useEffect(() => {
|
|
565
|
+
return () => {
|
|
566
|
+
editor?.destroy();
|
|
567
|
+
};
|
|
568
|
+
}, [editor]);
|
|
569
|
+
if (!editor)
|
|
570
|
+
return null;
|
|
571
|
+
const handleWrapperClick = (e) => {
|
|
572
|
+
// If the click was on the wrapper (empty area), not on editor content, focus at end
|
|
573
|
+
const target = e.target;
|
|
574
|
+
if (target.classList.contains("re-editor-clickable") ||
|
|
575
|
+
target.classList.contains("re-editor-wrapper")) {
|
|
576
|
+
editor.chain().focus("end").run();
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
return (_jsxs("div", { className: "re-editor-wrapper re-editor-clickable", onClick: handleWrapperClick, style: { position: "relative", minHeight: "100%", cursor: "text" }, children: [parsed.frontmatter && (_jsx(FrontmatterBar, { frontmatter: parsed.frontmatter, onChange: (updated) => {
|
|
580
|
+
frontmatterRef.current = updated;
|
|
581
|
+
// Get current body and combine with updated frontmatter
|
|
582
|
+
try {
|
|
583
|
+
const md = editor.storage.markdown.getMarkdown();
|
|
584
|
+
onChangeRef.current(updated.raw + md);
|
|
585
|
+
}
|
|
586
|
+
catch {
|
|
587
|
+
// fallback
|
|
588
|
+
}
|
|
589
|
+
} })), _jsx(InlineBubbleToolbar, { editor: editor }), _jsx(SlashMenu, { editor: editor }), _jsx(EditorContent, { editor: editor })] }));
|
|
590
|
+
}
|
|
591
|
+
// --- Main ResourceEditor ---
|
|
592
|
+
export function ResourceEditor({ resource, onSave }) {
|
|
593
|
+
const [content, setContent] = useState(resource.content);
|
|
594
|
+
const [view, setView] = useState(getViewPref);
|
|
595
|
+
const [saveStatus, setSaveStatus] = useState("idle");
|
|
596
|
+
const debounceRef = useRef(null);
|
|
597
|
+
const prevIdRef = useRef(resource.id);
|
|
598
|
+
// Reset content when resource changes
|
|
599
|
+
useEffect(() => {
|
|
600
|
+
if (prevIdRef.current !== resource.id) {
|
|
601
|
+
setContent(resource.content);
|
|
602
|
+
setSaveStatus("idle");
|
|
603
|
+
prevIdRef.current = resource.id;
|
|
604
|
+
}
|
|
605
|
+
}, [resource.id, resource.content]);
|
|
606
|
+
const handleChange = useCallback((newContent) => {
|
|
607
|
+
setContent(newContent);
|
|
608
|
+
setSaveStatus("idle");
|
|
609
|
+
if (debounceRef.current)
|
|
610
|
+
clearTimeout(debounceRef.current);
|
|
611
|
+
debounceRef.current = setTimeout(() => {
|
|
612
|
+
setSaveStatus("saving");
|
|
613
|
+
onSave(newContent);
|
|
614
|
+
setTimeout(() => setSaveStatus("saved"), 300);
|
|
615
|
+
}, 1000);
|
|
616
|
+
}, [onSave]);
|
|
617
|
+
const switchView = useCallback((v) => {
|
|
618
|
+
setView(v);
|
|
619
|
+
setViewPref(v);
|
|
620
|
+
}, []);
|
|
621
|
+
// Cleanup debounce on unmount
|
|
622
|
+
useEffect(() => {
|
|
623
|
+
return () => {
|
|
624
|
+
if (debounceRef.current)
|
|
625
|
+
clearTimeout(debounceRef.current);
|
|
626
|
+
};
|
|
627
|
+
}, []);
|
|
628
|
+
const isMarkdown = resource.mimeType === "text/markdown" || resource.path.endsWith(".md");
|
|
629
|
+
const isImage = resource.mimeType.startsWith("image/");
|
|
630
|
+
// Image preview
|
|
631
|
+
if (isImage) {
|
|
632
|
+
return (_jsx("div", { className: "flex h-full flex-col", children: _jsx("div", { className: "flex flex-1 items-center justify-center overflow-auto p-4", children: _jsx("img", { src: `/_agent-native/resources/${resource.id}?raw`, alt: resource.path, className: "max-h-full max-w-full object-contain" }) }) }));
|
|
633
|
+
}
|
|
634
|
+
// Markdown files get visual/code toggle
|
|
635
|
+
if (isMarkdown) {
|
|
636
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsx("style", { children: editorStyles }), _jsxs("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("button", { onClick: () => switchView("visual"), className: cn("rounded-md px-2 py-1.5 text-[12px] leading-none", view === "visual"
|
|
637
|
+
? "bg-accent text-foreground"
|
|
638
|
+
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground"), style: CONTROL_STYLE, children: "Visual" }), _jsx("button", { onClick: () => switchView("code"), className: cn("rounded-md px-2 py-1.5 text-[12px] leading-none", view === "code"
|
|
639
|
+
? "bg-accent text-foreground"
|
|
640
|
+
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground"), style: CONTROL_STYLE, children: "Code" })] }), _jsx("span", { className: "text-[11px] text-muted-foreground/60", children: saveStatus === "saving"
|
|
641
|
+
? "Saving..."
|
|
642
|
+
: saveStatus === "saved"
|
|
643
|
+
? "Saved"
|
|
644
|
+
: "" })] }), view === "visual" ? (_jsx("div", { className: "flex-1 min-h-0 overflow-y-auto p-3", children: _jsx(VisualMarkdownEditor, { content: content, onChange: handleChange, resourceId: resource.id }) }, resource.id + "-visual")) : (_jsx("textarea", { value: content, onChange: (e) => handleChange(e.target.value), className: "flex-1 min-h-0 resize-none bg-transparent p-3 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50", style: {
|
|
645
|
+
fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',
|
|
646
|
+
lineHeight: 1.6,
|
|
647
|
+
}, spellCheck: false }))] }));
|
|
648
|
+
}
|
|
649
|
+
// Non-markdown text files: plain textarea
|
|
650
|
+
return (_jsx("div", { className: "flex h-full flex-col", children: _jsx("textarea", { value: content, onChange: (e) => handleChange(e.target.value), className: "flex-1 min-h-0 resize-none bg-transparent p-3 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50", style: {
|
|
651
|
+
fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',
|
|
652
|
+
lineHeight: 1.6,
|
|
653
|
+
}, spellCheck: false }) }));
|
|
654
|
+
}
|
|
655
|
+
// --- Scoped editor styles (injected inline so no external CSS needed) ---
|
|
656
|
+
const editorStyles = `
|
|
657
|
+
/* Prose styling for the visual editor */
|
|
658
|
+
.re-prose {
|
|
659
|
+
outline: none;
|
|
660
|
+
color: hsl(var(--foreground));
|
|
661
|
+
line-height: 1.65;
|
|
662
|
+
font-size: 13px;
|
|
663
|
+
min-height: 100%;
|
|
664
|
+
}
|
|
665
|
+
.re-prose > *:first-child { margin-top: 0; }
|
|
666
|
+
|
|
667
|
+
.re-prose h1 {
|
|
668
|
+
font-size: 1.5em;
|
|
669
|
+
font-weight: 700;
|
|
670
|
+
margin: 1em 0 0.25em;
|
|
671
|
+
line-height: 1.25;
|
|
672
|
+
}
|
|
673
|
+
.re-prose h2 {
|
|
674
|
+
font-size: 1.25em;
|
|
675
|
+
font-weight: 600;
|
|
676
|
+
margin: 0.8em 0 0.2em;
|
|
677
|
+
line-height: 1.3;
|
|
678
|
+
}
|
|
679
|
+
.re-prose h3 {
|
|
680
|
+
font-size: 1.1em;
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
margin: 0.6em 0 0.15em;
|
|
683
|
+
line-height: 1.35;
|
|
684
|
+
}
|
|
685
|
+
.re-prose p {
|
|
686
|
+
margin: 0.35em 0;
|
|
687
|
+
min-height: 1.65em;
|
|
688
|
+
}
|
|
689
|
+
.re-prose ul {
|
|
690
|
+
list-style-type: disc;
|
|
691
|
+
padding-left: 1.4em;
|
|
692
|
+
margin: 0.2em 0;
|
|
693
|
+
}
|
|
694
|
+
.re-prose ol {
|
|
695
|
+
list-style-type: decimal;
|
|
696
|
+
padding-left: 1.4em;
|
|
697
|
+
margin: 0.2em 0;
|
|
698
|
+
}
|
|
699
|
+
.re-prose li { margin: 0.05em 0; }
|
|
700
|
+
.re-prose li p { margin: 0; }
|
|
701
|
+
|
|
702
|
+
.re-prose blockquote {
|
|
703
|
+
border-left: 2px solid hsl(var(--border));
|
|
704
|
+
padding-left: 0.8em;
|
|
705
|
+
margin: 0.3em 0;
|
|
706
|
+
color: hsl(var(--muted-foreground));
|
|
707
|
+
}
|
|
708
|
+
.re-prose code {
|
|
709
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
710
|
+
font-size: 0.88em;
|
|
711
|
+
background: hsl(var(--muted));
|
|
712
|
+
padding: 0.1em 0.3em;
|
|
713
|
+
border-radius: 3px;
|
|
714
|
+
}
|
|
715
|
+
.re-prose pre {
|
|
716
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
717
|
+
font-size: 12px;
|
|
718
|
+
background: hsl(var(--muted));
|
|
719
|
+
border-radius: 4px;
|
|
720
|
+
padding: 0.7em 0.9em;
|
|
721
|
+
margin: 0.3em 0;
|
|
722
|
+
overflow-x: auto;
|
|
723
|
+
line-height: 1.5;
|
|
724
|
+
}
|
|
725
|
+
.re-prose pre code {
|
|
726
|
+
background: none;
|
|
727
|
+
padding: 0;
|
|
728
|
+
border: none;
|
|
729
|
+
font-size: inherit;
|
|
730
|
+
}
|
|
731
|
+
.re-prose hr {
|
|
732
|
+
border: none;
|
|
733
|
+
border-top: 1px solid hsl(var(--border));
|
|
734
|
+
margin: 1em 0;
|
|
735
|
+
}
|
|
736
|
+
.re-prose strong { font-weight: 600; }
|
|
737
|
+
.re-prose em { font-style: italic; }
|
|
738
|
+
.re-prose s { text-decoration: line-through; }
|
|
739
|
+
|
|
740
|
+
.re-link {
|
|
741
|
+
color: hsl(var(--foreground));
|
|
742
|
+
text-decoration: underline;
|
|
743
|
+
text-underline-offset: 2px;
|
|
744
|
+
text-decoration-color: hsl(var(--muted-foreground));
|
|
745
|
+
cursor: pointer;
|
|
746
|
+
}
|
|
747
|
+
.re-link:hover {
|
|
748
|
+
text-decoration-color: hsl(var(--foreground));
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/* Placeholder */
|
|
752
|
+
.re-prose p.is-editor-empty:first-child::before,
|
|
753
|
+
.re-prose p.is-empty::before,
|
|
754
|
+
.re-prose h1.is-empty::before,
|
|
755
|
+
.re-prose h2.is-empty::before,
|
|
756
|
+
.re-prose h3.is-empty::before {
|
|
757
|
+
content: attr(data-placeholder);
|
|
758
|
+
float: left;
|
|
759
|
+
color: hsl(var(--muted-foreground));
|
|
760
|
+
opacity: 0.5;
|
|
761
|
+
pointer-events: none;
|
|
762
|
+
height: 0;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/* Selection */
|
|
766
|
+
.re-prose ::selection {
|
|
767
|
+
background: hsl(210 100% 52% / 0.2);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/* Bubble toolbar */
|
|
771
|
+
.re-bubble-toolbar {
|
|
772
|
+
display: flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
background: hsl(0 0% 15%);
|
|
775
|
+
border-radius: 6px;
|
|
776
|
+
padding: 3px;
|
|
777
|
+
box-shadow: 0 4px 16px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(255 255 255 / 0.06);
|
|
778
|
+
}
|
|
779
|
+
.re-bubble-btn {
|
|
780
|
+
padding: 3px 6px;
|
|
781
|
+
border-radius: 4px;
|
|
782
|
+
font-size: 12px;
|
|
783
|
+
color: rgba(255,255,255,0.75);
|
|
784
|
+
background: none;
|
|
785
|
+
border: none;
|
|
786
|
+
cursor: pointer;
|
|
787
|
+
line-height: 1;
|
|
788
|
+
}
|
|
789
|
+
.re-bubble-btn:hover {
|
|
790
|
+
background: rgba(255,255,255,0.12);
|
|
791
|
+
color: white;
|
|
792
|
+
}
|
|
793
|
+
.re-bubble-btn--active {
|
|
794
|
+
background: rgba(255,255,255,0.18);
|
|
795
|
+
color: white;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* Slash command menu */
|
|
799
|
+
.re-slash-menu {
|
|
800
|
+
background: hsl(var(--popover));
|
|
801
|
+
border: 1px solid hsl(var(--border));
|
|
802
|
+
border-radius: 6px;
|
|
803
|
+
box-shadow: 0 4px 20px rgb(0 0 0 / 0.12), 0 0 0 1px rgb(0 0 0 / 0.04);
|
|
804
|
+
min-width: 220px;
|
|
805
|
+
max-height: 320px;
|
|
806
|
+
overflow-y: auto;
|
|
807
|
+
color: hsl(var(--foreground));
|
|
808
|
+
}
|
|
809
|
+
.re-slash-item {
|
|
810
|
+
width: 100%;
|
|
811
|
+
display: flex;
|
|
812
|
+
align-items: center;
|
|
813
|
+
gap: 8px;
|
|
814
|
+
padding: 6px 10px;
|
|
815
|
+
text-align: left;
|
|
816
|
+
background: none;
|
|
817
|
+
border: none;
|
|
818
|
+
cursor: pointer;
|
|
819
|
+
color: hsl(var(--foreground));
|
|
820
|
+
font-size: 13px;
|
|
821
|
+
}
|
|
822
|
+
.re-slash-item:hover,
|
|
823
|
+
.re-slash-item--active {
|
|
824
|
+
background: hsl(var(--accent));
|
|
825
|
+
}
|
|
826
|
+
.re-slash-icon {
|
|
827
|
+
display: flex;
|
|
828
|
+
align-items: center;
|
|
829
|
+
justify-content: center;
|
|
830
|
+
width: 28px;
|
|
831
|
+
height: 28px;
|
|
832
|
+
border-radius: 4px;
|
|
833
|
+
border: 1px solid hsl(var(--border));
|
|
834
|
+
background: hsl(var(--background));
|
|
835
|
+
font-size: 12px;
|
|
836
|
+
font-weight: 600;
|
|
837
|
+
color: hsl(var(--muted-foreground));
|
|
838
|
+
flex-shrink: 0;
|
|
839
|
+
}
|
|
840
|
+
.re-slash-title {
|
|
841
|
+
display: block;
|
|
842
|
+
font-weight: 500;
|
|
843
|
+
font-size: 13px;
|
|
844
|
+
}
|
|
845
|
+
.re-slash-desc {
|
|
846
|
+
display: block;
|
|
847
|
+
font-size: 11px;
|
|
848
|
+
color: hsl(var(--muted-foreground));
|
|
849
|
+
}
|
|
850
|
+
`;
|
|
851
|
+
//# sourceMappingURL=ResourceEditor.js.map
|