yepanywhere 0.1.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/bundled/@yep-anywhere/shared/dist/app-types.d.ts +229 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.js +46 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.d.ts +16 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.d.ts +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.d.ts +24 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.js +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.js +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts +78 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.js +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.d.ts +18 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.js +19 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.d.ts +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts +68 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js +37 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts +52 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js +29 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.d.ts +72 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.d.ts +14 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.js +39 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js +26 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts +566 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js +39 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts +93 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js +40 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.d.ts +105 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.js +20 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.d.ts +53 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.js +54 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.d.ts +9 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.js +9 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.d.ts +32 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts +288 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.js +293 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.d.ts +83 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.d.ts +42 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.js +11 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.d.ts +99 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.js +64 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.d.ts +17 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts +600 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js +282 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/dag.d.ts +35 -0
- package/bundled/@yep-anywhere/shared/dist/dag.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/dag.js +75 -0
- package/bundled/@yep-anywhere/shared/dist/dag.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.d.ts +72 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js +376 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.d.ts +95 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.js +57 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.d.ts +174 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.js +117 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.d.ts +18 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.js +18 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.d.ts +267 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.js +147 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.d.ts +30 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.js +58 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +24 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts +457 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js +217 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.d.ts +23 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.js +23 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts +149 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js +158 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.d.ts +48 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.js +74 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.d.ts +171 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.js +189 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts +31 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.d.ts +3 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +172 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.js +33 -0
- package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/upload.d.ts +58 -0
- package/bundled/@yep-anywhere/shared/dist/upload.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/upload.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/upload.js.map +1 -0
- package/bundled/@yep-anywhere/shared/package.json +7 -0
- package/client-dist/assets/index-C7DeAWG4.css +1 -0
- package/client-dist/assets/index-yX0HPwrz.js +147 -0
- package/client-dist/badge-96.png +0 -0
- package/client-dist/badge.svg +20 -0
- package/client-dist/debug-streaming.html +746 -0
- package/client-dist/favicon.ico +0 -0
- package/client-dist/icon-192.png +0 -0
- package/client-dist/icon-512.png +0 -0
- package/client-dist/icon.svg +27 -0
- package/client-dist/index.html +35 -0
- package/client-dist/manifest.json +23 -0
- package/client-dist/sw.js +482 -0
- package/dist/app.d.ts +67 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +236 -0
- package/dist/app.js.map +1 -0
- package/dist/augments/augment-generator.d.ts +30 -0
- package/dist/augments/augment-generator.d.ts.map +1 -0
- package/dist/augments/augment-generator.js +171 -0
- package/dist/augments/augment-generator.js.map +1 -0
- package/dist/augments/block-detector.d.ts +81 -0
- package/dist/augments/block-detector.d.ts.map +1 -0
- package/dist/augments/block-detector.js +615 -0
- package/dist/augments/block-detector.js.map +1 -0
- package/dist/augments/edit-augments.d.ts +138 -0
- package/dist/augments/edit-augments.d.ts.map +1 -0
- package/dist/augments/edit-augments.js +665 -0
- package/dist/augments/edit-augments.js.map +1 -0
- package/dist/augments/index.d.ts +14 -0
- package/dist/augments/index.d.ts.map +1 -0
- package/dist/augments/index.js +20 -0
- package/dist/augments/index.js.map +1 -0
- package/dist/augments/markdown-augments.d.ts +33 -0
- package/dist/augments/markdown-augments.d.ts.map +1 -0
- package/dist/augments/markdown-augments.js +128 -0
- package/dist/augments/markdown-augments.js.map +1 -0
- package/dist/augments/read-augments.d.ts +40 -0
- package/dist/augments/read-augments.d.ts.map +1 -0
- package/dist/augments/read-augments.js +64 -0
- package/dist/augments/read-augments.js.map +1 -0
- package/dist/augments/stream-coordinator.d.ts +32 -0
- package/dist/augments/stream-coordinator.d.ts.map +1 -0
- package/dist/augments/stream-coordinator.js +115 -0
- package/dist/augments/stream-coordinator.js.map +1 -0
- package/dist/augments/write-augments.d.ts +32 -0
- package/dist/augments/write-augments.d.ts.map +1 -0
- package/dist/augments/write-augments.js +27 -0
- package/dist/augments/write-augments.js.map +1 -0
- package/dist/auth/AuthService.d.ts +98 -0
- package/dist/auth/AuthService.d.ts.map +1 -0
- package/dist/auth/AuthService.js +217 -0
- package/dist/auth/AuthService.js.map +1 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +3 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/routes.d.ts +13 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +149 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/cli.d.ts +19 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +152 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +76 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +124 -0
- package/dist/config.js.map +1 -0
- package/dist/dev-mock.d.ts +18 -0
- package/dist/dev-mock.d.ts.map +1 -0
- package/dist/dev-mock.js +260 -0
- package/dist/dev-mock.js.map +1 -0
- package/dist/frontend/index.d.ts +10 -0
- package/dist/frontend/index.d.ts.map +1 -0
- package/dist/frontend/index.js +10 -0
- package/dist/frontend/index.js.map +1 -0
- package/dist/frontend/proxy.d.ts +70 -0
- package/dist/frontend/proxy.d.ts.map +1 -0
- package/dist/frontend/proxy.js +329 -0
- package/dist/frontend/proxy.js.map +1 -0
- package/dist/frontend/static.d.ts +16 -0
- package/dist/frontend/static.d.ts.map +1 -0
- package/dist/frontend/static.js +106 -0
- package/dist/frontend/static.js.map +1 -0
- package/dist/highlighting/index.d.ts +43 -0
- package/dist/highlighting/index.d.ts.map +1 -0
- package/dist/highlighting/index.js +224 -0
- package/dist/highlighting/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +259 -0
- package/dist/index.js.map +1 -0
- package/dist/indexes/SessionIndexService.d.ts +106 -0
- package/dist/indexes/SessionIndexService.d.ts.map +1 -0
- package/dist/indexes/SessionIndexService.js +356 -0
- package/dist/indexes/SessionIndexService.js.map +1 -0
- package/dist/indexes/index.d.ts +3 -0
- package/dist/indexes/index.d.ts.map +1 -0
- package/dist/indexes/index.js +2 -0
- package/dist/indexes/index.js.map +1 -0
- package/dist/indexes/types.d.ts +55 -0
- package/dist/indexes/types.d.ts.map +1 -0
- package/dist/indexes/types.js +8 -0
- package/dist/indexes/types.js.map +1 -0
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +2 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.d.ts +81 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +257 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/maintenance/debug-routes.d.ts +39 -0
- package/dist/maintenance/debug-routes.d.ts.map +1 -0
- package/dist/maintenance/debug-routes.js +561 -0
- package/dist/maintenance/debug-routes.js.map +1 -0
- package/dist/maintenance/index.d.ts +3 -0
- package/dist/maintenance/index.d.ts.map +1 -0
- package/dist/maintenance/index.js +3 -0
- package/dist/maintenance/index.js.map +1 -0
- package/dist/maintenance/server.d.ts +53 -0
- package/dist/maintenance/server.d.ts.map +1 -0
- package/dist/maintenance/server.js +419 -0
- package/dist/maintenance/server.js.map +1 -0
- package/dist/metadata/SessionMetadataService.d.ts +96 -0
- package/dist/metadata/SessionMetadataService.d.ts.map +1 -0
- package/dist/metadata/SessionMetadataService.js +209 -0
- package/dist/metadata/SessionMetadataService.js.map +1 -0
- package/dist/metadata/index.d.ts +2 -0
- package/dist/metadata/index.d.ts.map +1 -0
- package/dist/metadata/index.js +2 -0
- package/dist/metadata/index.js.map +1 -0
- package/dist/middleware/auth.d.ts +18 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +53 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/security.d.ts +4 -0
- package/dist/middleware/security.d.ts.map +1 -0
- package/dist/middleware/security.js +28 -0
- package/dist/middleware/security.js.map +1 -0
- package/dist/notifications/NotificationService.d.ts +76 -0
- package/dist/notifications/NotificationService.d.ts.map +1 -0
- package/dist/notifications/NotificationService.js +155 -0
- package/dist/notifications/NotificationService.js.map +1 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/projects/codex-scanner.d.ts +52 -0
- package/dist/projects/codex-scanner.d.ts.map +1 -0
- package/dist/projects/codex-scanner.js +167 -0
- package/dist/projects/codex-scanner.js.map +1 -0
- package/dist/projects/gemini-project-map.d.ts +54 -0
- package/dist/projects/gemini-project-map.d.ts.map +1 -0
- package/dist/projects/gemini-project-map.js +116 -0
- package/dist/projects/gemini-project-map.js.map +1 -0
- package/dist/projects/gemini-scanner.d.ts +58 -0
- package/dist/projects/gemini-scanner.d.ts.map +1 -0
- package/dist/projects/gemini-scanner.js +210 -0
- package/dist/projects/gemini-scanner.js.map +1 -0
- package/dist/projects/index.d.ts +16 -0
- package/dist/projects/index.d.ts.map +1 -0
- package/dist/projects/index.js +17 -0
- package/dist/projects/index.js.map +1 -0
- package/dist/projects/paths.d.ts +127 -0
- package/dist/projects/paths.d.ts.map +1 -0
- package/dist/projects/paths.js +185 -0
- package/dist/projects/paths.js.map +1 -0
- package/dist/projects/scanner.d.ts +45 -0
- package/dist/projects/scanner.d.ts.map +1 -0
- package/dist/projects/scanner.js +287 -0
- package/dist/projects/scanner.js.map +1 -0
- package/dist/push/PushNotifier.d.ts +48 -0
- package/dist/push/PushNotifier.d.ts.map +1 -0
- package/dist/push/PushNotifier.js +145 -0
- package/dist/push/PushNotifier.js.map +1 -0
- package/dist/push/PushService.d.ts +95 -0
- package/dist/push/PushService.d.ts.map +1 -0
- package/dist/push/PushService.js +245 -0
- package/dist/push/PushService.js.map +1 -0
- package/dist/push/index.d.ts +9 -0
- package/dist/push/index.d.ts.map +1 -0
- package/dist/push/index.js +8 -0
- package/dist/push/index.js.map +1 -0
- package/dist/push/routes.d.ts +10 -0
- package/dist/push/routes.d.ts.map +1 -0
- package/dist/push/routes.js +111 -0
- package/dist/push/routes.js.map +1 -0
- package/dist/push/types.d.ts +80 -0
- package/dist/push/types.d.ts.map +1 -0
- package/dist/push/types.js +5 -0
- package/dist/push/types.js.map +1 -0
- package/dist/push/vapid.d.ts +42 -0
- package/dist/push/vapid.d.ts.map +1 -0
- package/dist/push/vapid.js +132 -0
- package/dist/push/vapid.js.map +1 -0
- package/dist/recents/RecentsService.d.ts +77 -0
- package/dist/recents/RecentsService.d.ts.map +1 -0
- package/dist/recents/RecentsService.js +155 -0
- package/dist/recents/RecentsService.js.map +1 -0
- package/dist/recents/index.d.ts +2 -0
- package/dist/recents/index.d.ts.map +1 -0
- package/dist/recents/index.js +2 -0
- package/dist/recents/index.js.map +1 -0
- package/dist/routes/activity.d.ts +7 -0
- package/dist/routes/activity.d.ts.map +1 -0
- package/dist/routes/activity.js +80 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/beads.d.ts +42 -0
- package/dist/routes/beads.d.ts.map +1 -0
- package/dist/routes/beads.js +101 -0
- package/dist/routes/beads.js.map +1 -0
- package/dist/routes/debug-streaming.d.ts +7 -0
- package/dist/routes/debug-streaming.d.ts.map +1 -0
- package/dist/routes/debug-streaming.js +88 -0
- package/dist/routes/debug-streaming.js.map +1 -0
- package/dist/routes/dev.d.ts +11 -0
- package/dist/routes/dev.d.ts.map +1 -0
- package/dist/routes/dev.js +55 -0
- package/dist/routes/dev.js.map +1 -0
- package/dist/routes/files.d.ts +7 -0
- package/dist/routes/files.d.ts.map +1 -0
- package/dist/routes/files.js +429 -0
- package/dist/routes/files.js.map +1 -0
- package/dist/routes/global-sessions.d.ts +76 -0
- package/dist/routes/global-sessions.d.ts.map +1 -0
- package/dist/routes/global-sessions.js +207 -0
- package/dist/routes/global-sessions.js.map +1 -0
- package/dist/routes/health.d.ts +3 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +6 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/inbox.d.ts +45 -0
- package/dist/routes/inbox.d.ts.map +1 -0
- package/dist/routes/inbox.js +174 -0
- package/dist/routes/inbox.js.map +1 -0
- package/dist/routes/processes.d.ts +16 -0
- package/dist/routes/processes.d.ts.map +1 -0
- package/dist/routes/processes.js +82 -0
- package/dist/routes/processes.js.map +1 -0
- package/dist/routes/projects.d.ts +30 -0
- package/dist/routes/projects.d.ts.map +1 -0
- package/dist/routes/projects.js +316 -0
- package/dist/routes/projects.js.map +1 -0
- package/dist/routes/providers.d.ts +9 -0
- package/dist/routes/providers.d.ts.map +1 -0
- package/dist/routes/providers.js +63 -0
- package/dist/routes/providers.js.map +1 -0
- package/dist/routes/recents.d.ts +14 -0
- package/dist/routes/recents.d.ts.map +1 -0
- package/dist/routes/recents.js +82 -0
- package/dist/routes/recents.js.map +1 -0
- package/dist/routes/sessions.d.ts +26 -0
- package/dist/routes/sessions.d.ts.map +1 -0
- package/dist/routes/sessions.js +962 -0
- package/dist/routes/sessions.js.map +1 -0
- package/dist/routes/stream.d.ts +7 -0
- package/dist/routes/stream.d.ts.map +1 -0
- package/dist/routes/stream.js +561 -0
- package/dist/routes/stream.js.map +1 -0
- package/dist/routes/upload.d.ts +14 -0
- package/dist/routes/upload.d.ts.map +1 -0
- package/dist/routes/upload.js +278 -0
- package/dist/routes/upload.js.map +1 -0
- package/dist/sdk/cli-detection.d.ts +47 -0
- package/dist/sdk/cli-detection.d.ts.map +1 -0
- package/dist/sdk/cli-detection.js +122 -0
- package/dist/sdk/cli-detection.js.map +1 -0
- package/dist/sdk/messageLogger.d.ts +15 -0
- package/dist/sdk/messageLogger.d.ts.map +1 -0
- package/dist/sdk/messageLogger.js +68 -0
- package/dist/sdk/messageLogger.js.map +1 -0
- package/dist/sdk/messageQueue.d.ts +49 -0
- package/dist/sdk/messageQueue.d.ts.map +1 -0
- package/dist/sdk/messageQueue.js +186 -0
- package/dist/sdk/messageQueue.js.map +1 -0
- package/dist/sdk/mock.d.ts +16 -0
- package/dist/sdk/mock.d.ts.map +1 -0
- package/dist/sdk/mock.js +81 -0
- package/dist/sdk/mock.js.map +1 -0
- package/dist/sdk/providers/__mocks__/base.d.ts +78 -0
- package/dist/sdk/providers/__mocks__/base.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/base.js +185 -0
- package/dist/sdk/providers/__mocks__/base.js.map +1 -0
- package/dist/sdk/providers/__mocks__/claude.d.ts +33 -0
- package/dist/sdk/providers/__mocks__/claude.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/claude.js +146 -0
- package/dist/sdk/providers/__mocks__/claude.js.map +1 -0
- package/dist/sdk/providers/__mocks__/codex.d.ts +45 -0
- package/dist/sdk/providers/__mocks__/codex.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/codex.js +160 -0
- package/dist/sdk/providers/__mocks__/codex.js.map +1 -0
- package/dist/sdk/providers/__mocks__/factory.d.ts +40 -0
- package/dist/sdk/providers/__mocks__/factory.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/factory.js +183 -0
- package/dist/sdk/providers/__mocks__/factory.js.map +1 -0
- package/dist/sdk/providers/__mocks__/gemini.d.ts +43 -0
- package/dist/sdk/providers/__mocks__/gemini.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/gemini.js +198 -0
- package/dist/sdk/providers/__mocks__/gemini.js.map +1 -0
- package/dist/sdk/providers/__mocks__/index.d.ts +23 -0
- package/dist/sdk/providers/__mocks__/index.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/index.js +25 -0
- package/dist/sdk/providers/__mocks__/index.js.map +1 -0
- package/dist/sdk/providers/__mocks__/opencode.d.ts +33 -0
- package/dist/sdk/providers/__mocks__/opencode.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/opencode.js +136 -0
- package/dist/sdk/providers/__mocks__/opencode.js.map +1 -0
- package/dist/sdk/providers/__mocks__/types.d.ts +50 -0
- package/dist/sdk/providers/__mocks__/types.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/types.js +8 -0
- package/dist/sdk/providers/__mocks__/types.js.map +1 -0
- package/dist/sdk/providers/claude.d.ts +63 -0
- package/dist/sdk/providers/claude.d.ts.map +1 -0
- package/dist/sdk/providers/claude.js +252 -0
- package/dist/sdk/providers/claude.js.map +1 -0
- package/dist/sdk/providers/codex-oss.d.ts +108 -0
- package/dist/sdk/providers/codex-oss.d.ts.map +1 -0
- package/dist/sdk/providers/codex-oss.js +744 -0
- package/dist/sdk/providers/codex-oss.js.map +1 -0
- package/dist/sdk/providers/codex.d.ts +82 -0
- package/dist/sdk/providers/codex.d.ts.map +1 -0
- package/dist/sdk/providers/codex.js +597 -0
- package/dist/sdk/providers/codex.js.map +1 -0
- package/dist/sdk/providers/gemini.d.ts +78 -0
- package/dist/sdk/providers/gemini.d.ts.map +1 -0
- package/dist/sdk/providers/gemini.js +536 -0
- package/dist/sdk/providers/gemini.js.map +1 -0
- package/dist/sdk/providers/index.d.ts +22 -0
- package/dist/sdk/providers/index.d.ts.map +1 -0
- package/dist/sdk/providers/index.js +53 -0
- package/dist/sdk/providers/index.js.map +1 -0
- package/dist/sdk/providers/opencode.d.ts +95 -0
- package/dist/sdk/providers/opencode.d.ts.map +1 -0
- package/dist/sdk/providers/opencode.js +586 -0
- package/dist/sdk/providers/opencode.js.map +1 -0
- package/dist/sdk/providers/types.d.ts +99 -0
- package/dist/sdk/providers/types.d.ts.map +1 -0
- package/dist/sdk/providers/types.js +2 -0
- package/dist/sdk/providers/types.js.map +1 -0
- package/dist/sdk/real.d.ts +20 -0
- package/dist/sdk/real.d.ts.map +1 -0
- package/dist/sdk/real.js +22 -0
- package/dist/sdk/real.js.map +1 -0
- package/dist/sdk/types.d.ts +113 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +3 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/sessions/Session.d.ts +80 -0
- package/dist/sessions/Session.d.ts.map +1 -0
- package/dist/sessions/Session.js +119 -0
- package/dist/sessions/Session.js.map +1 -0
- package/dist/sessions/codex-reader.d.ts +166 -0
- package/dist/sessions/codex-reader.d.ts.map +1 -0
- package/dist/sessions/codex-reader.js +664 -0
- package/dist/sessions/codex-reader.js.map +1 -0
- package/dist/sessions/dag.d.ts +62 -0
- package/dist/sessions/dag.d.ts.map +1 -0
- package/dist/sessions/dag.js +175 -0
- package/dist/sessions/dag.js.map +1 -0
- package/dist/sessions/fork.d.ts +34 -0
- package/dist/sessions/fork.d.ts.map +1 -0
- package/dist/sessions/fork.js +58 -0
- package/dist/sessions/fork.js.map +1 -0
- package/dist/sessions/gemini-reader.d.ts +103 -0
- package/dist/sessions/gemini-reader.d.ts.map +1 -0
- package/dist/sessions/gemini-reader.js +332 -0
- package/dist/sessions/gemini-reader.js.map +1 -0
- package/dist/sessions/normalization.d.ts +7 -0
- package/dist/sessions/normalization.d.ts.map +1 -0
- package/dist/sessions/normalization.js +429 -0
- package/dist/sessions/normalization.js.map +1 -0
- package/dist/sessions/opencode-reader.d.ts +99 -0
- package/dist/sessions/opencode-reader.d.ts.map +1 -0
- package/dist/sessions/opencode-reader.js +370 -0
- package/dist/sessions/opencode-reader.js.map +1 -0
- package/dist/sessions/reader.d.ts +118 -0
- package/dist/sessions/reader.d.ts.map +1 -0
- package/dist/sessions/reader.js +444 -0
- package/dist/sessions/reader.js.map +1 -0
- package/dist/sessions/types.d.ts +77 -0
- package/dist/sessions/types.d.ts.map +1 -0
- package/dist/sessions/types.js +8 -0
- package/dist/sessions/types.js.map +1 -0
- package/dist/supervisor/ExternalSessionTracker.d.ts +94 -0
- package/dist/supervisor/ExternalSessionTracker.d.ts.map +1 -0
- package/dist/supervisor/ExternalSessionTracker.js +507 -0
- package/dist/supervisor/ExternalSessionTracker.js.map +1 -0
- package/dist/supervisor/Process.d.ts +230 -0
- package/dist/supervisor/Process.d.ts.map +1 -0
- package/dist/supervisor/Process.js +878 -0
- package/dist/supervisor/Process.js.map +1 -0
- package/dist/supervisor/Supervisor.d.ts +191 -0
- package/dist/supervisor/Supervisor.d.ts.map +1 -0
- package/dist/supervisor/Supervisor.js +933 -0
- package/dist/supervisor/Supervisor.js.map +1 -0
- package/dist/supervisor/WorkerQueue.d.ts +113 -0
- package/dist/supervisor/WorkerQueue.d.ts.map +1 -0
- package/dist/supervisor/WorkerQueue.js +148 -0
- package/dist/supervisor/WorkerQueue.js.map +1 -0
- package/dist/supervisor/types.d.ts +176 -0
- package/dist/supervisor/types.d.ts.map +1 -0
- package/dist/supervisor/types.js +7 -0
- package/dist/supervisor/types.js.map +1 -0
- package/dist/testing/mockProjectData.d.ts +5 -0
- package/dist/testing/mockProjectData.d.ts.map +1 -0
- package/dist/testing/mockProjectData.js +27 -0
- package/dist/testing/mockProjectData.js.map +1 -0
- package/dist/uploads/index.d.ts +3 -0
- package/dist/uploads/index.d.ts.map +1 -0
- package/dist/uploads/index.js +2 -0
- package/dist/uploads/index.js.map +1 -0
- package/dist/uploads/manager.d.ts +84 -0
- package/dist/uploads/manager.d.ts.map +1 -0
- package/dist/uploads/manager.js +215 -0
- package/dist/uploads/manager.js.map +1 -0
- package/dist/utils/fileLock.d.ts +57 -0
- package/dist/utils/fileLock.d.ts.map +1 -0
- package/dist/utils/fileLock.js +91 -0
- package/dist/utils/fileLock.js.map +1 -0
- package/dist/watcher/BatchProcessor.d.ts +58 -0
- package/dist/watcher/BatchProcessor.d.ts.map +1 -0
- package/dist/watcher/BatchProcessor.js +105 -0
- package/dist/watcher/BatchProcessor.js.map +1 -0
- package/dist/watcher/EventBus.d.ts +157 -0
- package/dist/watcher/EventBus.d.ts.map +1 -0
- package/dist/watcher/EventBus.js +36 -0
- package/dist/watcher/EventBus.js.map +1 -0
- package/dist/watcher/FileWatcher.d.ts +42 -0
- package/dist/watcher/FileWatcher.d.ts.map +1 -0
- package/dist/watcher/FileWatcher.js +165 -0
- package/dist/watcher/FileWatcher.js.map +1 -0
- package/dist/watcher/SourceWatcher.d.ts +36 -0
- package/dist/watcher/SourceWatcher.d.ts.map +1 -0
- package/dist/watcher/SourceWatcher.js +97 -0
- package/dist/watcher/SourceWatcher.js.map +1 -0
- package/dist/watcher/index.d.ts +9 -0
- package/dist/watcher/index.d.ts.map +1 -0
- package/dist/watcher/index.js +5 -0
- package/dist/watcher/index.js.map +1 -0
- package/package.json +54 -0
- package/scripts/postinstall.js +48 -0
|
@@ -0,0 +1,746 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Streaming Markdown Debug</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 20px;
|
|
16
|
+
background: #1a1a2e;
|
|
17
|
+
color: #eee;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h1 {
|
|
22
|
+
margin: 0 0 20px 0;
|
|
23
|
+
font-size: 1.5rem;
|
|
24
|
+
color: #fff;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.layout {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: 1fr 1fr;
|
|
30
|
+
gap: 20px;
|
|
31
|
+
height: calc(100vh - 100px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.panel {
|
|
35
|
+
background: #16213e;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
padding: 16px;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.panel h2 {
|
|
44
|
+
margin: 0 0 12px 0;
|
|
45
|
+
font-size: 1rem;
|
|
46
|
+
color: #888;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
letter-spacing: 0.5px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.controls {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
margin-bottom: 20px;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.control-group {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
gap: 4px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.control-group label {
|
|
66
|
+
font-size: 0.75rem;
|
|
67
|
+
color: #888;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
button {
|
|
71
|
+
background: #0f3460;
|
|
72
|
+
color: #fff;
|
|
73
|
+
border: none;
|
|
74
|
+
padding: 8px 16px;
|
|
75
|
+
border-radius: 4px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
font-size: 0.875rem;
|
|
78
|
+
transition: background 0.2s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
button:hover {
|
|
82
|
+
background: #e94560;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
button:disabled {
|
|
86
|
+
background: #333;
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
button.active {
|
|
91
|
+
background: #e94560;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
input[type="range"] {
|
|
95
|
+
width: 120px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
select {
|
|
99
|
+
background: #0f3460;
|
|
100
|
+
color: #fff;
|
|
101
|
+
border: none;
|
|
102
|
+
padding: 8px 12px;
|
|
103
|
+
border-radius: 4px;
|
|
104
|
+
font-size: 0.875rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
textarea {
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 150px;
|
|
110
|
+
background: #0a0a1a;
|
|
111
|
+
color: #eee;
|
|
112
|
+
border: 1px solid #333;
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
padding: 12px;
|
|
115
|
+
font-family: 'Monaco', 'Menlo', monospace;
|
|
116
|
+
font-size: 0.875rem;
|
|
117
|
+
resize: vertical;
|
|
118
|
+
margin-bottom: 12px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.output-container {
|
|
122
|
+
flex: 1;
|
|
123
|
+
overflow: auto;
|
|
124
|
+
background: #0a0a1a;
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
padding: 16px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Streaming output styles */
|
|
130
|
+
#streaming-output {
|
|
131
|
+
min-height: 100%;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
#streaming-output .streaming-block {
|
|
135
|
+
margin-bottom: 12px;
|
|
136
|
+
animation: fadeIn 0.2s ease-out;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@keyframes fadeIn {
|
|
140
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
141
|
+
to { opacity: 1; transform: translateY(0); }
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#streaming-output h1,
|
|
145
|
+
#streaming-output h2,
|
|
146
|
+
#streaming-output h3 {
|
|
147
|
+
color: #fff;
|
|
148
|
+
margin: 16px 0 8px 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
#streaming-output p {
|
|
152
|
+
margin: 0 0 12px 0;
|
|
153
|
+
line-height: 1.6;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#streaming-output pre {
|
|
157
|
+
background: #1e1e1e;
|
|
158
|
+
padding: 12px;
|
|
159
|
+
border-radius: 4px;
|
|
160
|
+
overflow-x: auto;
|
|
161
|
+
margin: 0 0 12px 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#streaming-output code {
|
|
165
|
+
font-family: 'Monaco', 'Menlo', monospace;
|
|
166
|
+
font-size: 0.875rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
#streaming-output ul,
|
|
170
|
+
#streaming-output ol {
|
|
171
|
+
margin: 0 0 12px 0;
|
|
172
|
+
padding-left: 24px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
#streaming-pending {
|
|
176
|
+
color: #888;
|
|
177
|
+
font-style: italic;
|
|
178
|
+
white-space: pre-wrap;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
#streaming-pending:not(:empty)::after {
|
|
182
|
+
content: '|';
|
|
183
|
+
animation: blink 1s step-end infinite;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@keyframes blink {
|
|
187
|
+
50% { opacity: 0; }
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Console log styles */
|
|
191
|
+
#console-log {
|
|
192
|
+
font-family: 'Monaco', 'Menlo', monospace;
|
|
193
|
+
font-size: 0.75rem;
|
|
194
|
+
line-height: 1.4;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.log-entry {
|
|
198
|
+
padding: 4px 8px;
|
|
199
|
+
border-bottom: 1px solid #222;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.log-entry.augment {
|
|
203
|
+
background: rgba(0, 128, 0, 0.1);
|
|
204
|
+
border-left: 3px solid #4caf50;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.log-entry.pending {
|
|
208
|
+
background: rgba(255, 165, 0, 0.1);
|
|
209
|
+
border-left: 3px solid #ff9800;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.log-entry.event {
|
|
213
|
+
background: rgba(33, 150, 243, 0.1);
|
|
214
|
+
border-left: 3px solid #2196f3;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.log-entry.error {
|
|
218
|
+
background: rgba(244, 67, 54, 0.1);
|
|
219
|
+
border-left: 3px solid #f44336;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.log-time {
|
|
223
|
+
color: #666;
|
|
224
|
+
margin-right: 8px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.presets {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-wrap: wrap;
|
|
230
|
+
gap: 8px;
|
|
231
|
+
margin-bottom: 12px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.preset-btn {
|
|
235
|
+
background: #333;
|
|
236
|
+
padding: 4px 8px;
|
|
237
|
+
font-size: 0.75rem;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.status-bar {
|
|
241
|
+
display: flex;
|
|
242
|
+
gap: 16px;
|
|
243
|
+
margin-top: 12px;
|
|
244
|
+
padding-top: 12px;
|
|
245
|
+
border-top: 1px solid #333;
|
|
246
|
+
font-size: 0.75rem;
|
|
247
|
+
color: #888;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.status-item {
|
|
251
|
+
display: flex;
|
|
252
|
+
gap: 4px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.status-item .label {
|
|
256
|
+
color: #666;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.status-item .value {
|
|
260
|
+
color: #4caf50;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.status-item .value.streaming {
|
|
264
|
+
color: #ff9800;
|
|
265
|
+
animation: pulse 1s infinite;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@keyframes pulse {
|
|
269
|
+
50% { opacity: 0.5; }
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* Shiki syntax highlighting CSS variables */
|
|
273
|
+
pre.shiki {
|
|
274
|
+
background-color: #1e1e1e !important;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.shiki span {
|
|
278
|
+
color: var(--shiki-light, var(--shiki-default, inherit));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@media (prefers-color-scheme: dark) {
|
|
282
|
+
.shiki span {
|
|
283
|
+
color: var(--shiki-dark, var(--shiki-default, inherit));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Force dark mode for this debug page */
|
|
288
|
+
.shiki span {
|
|
289
|
+
color: var(--shiki-dark, var(--shiki-default, inherit)) !important;
|
|
290
|
+
}
|
|
291
|
+
</style>
|
|
292
|
+
</head>
|
|
293
|
+
<body>
|
|
294
|
+
<h1>Streaming Markdown Debug (Server-Side StreamCoordinator)</h1>
|
|
295
|
+
|
|
296
|
+
<div class="controls">
|
|
297
|
+
<div class="control-group">
|
|
298
|
+
<label>Delay (ms/chunk)</label>
|
|
299
|
+
<input type="range" id="speed" min="1" max="200" value="20">
|
|
300
|
+
<span id="speed-value">20ms</span>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div class="control-group">
|
|
304
|
+
<label>Chunk Size (chars)</label>
|
|
305
|
+
<input type="range" id="chunk-size" min="1" max="50" value="5">
|
|
306
|
+
<span id="chunk-size-value">5</span>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
<button id="stream-btn">Stream</button>
|
|
310
|
+
<button id="stop-btn" disabled>Stop</button>
|
|
311
|
+
<button id="reset-btn">Reset</button>
|
|
312
|
+
<button id="clear-log-btn">Clear Log</button>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="presets">
|
|
316
|
+
<span style="color: #666; font-size: 0.75rem; margin-right: 8px;">Presets:</span>
|
|
317
|
+
<button class="preset-btn" data-preset="simple">Simple paragraph</button>
|
|
318
|
+
<button class="preset-btn" data-preset="code">Code block (JS)</button>
|
|
319
|
+
<button class="preset-btn" data-preset="textThenCode">Text then code</button>
|
|
320
|
+
<button class="preset-btn" data-preset="textThenList">Text then list</button>
|
|
321
|
+
<button class="preset-btn" data-preset="mixed">Mixed content</button>
|
|
322
|
+
<button class="preset-btn" data-preset="rapid">Rapid small chunks</button>
|
|
323
|
+
<button class="preset-btn" data-preset="long">Long document</button>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<textarea id="markdown-input" placeholder="Enter markdown here...">## Hello World
|
|
327
|
+
|
|
328
|
+
This is a **streaming markdown** test.
|
|
329
|
+
|
|
330
|
+
```javascript
|
|
331
|
+
function greet(name) {
|
|
332
|
+
console.log(`Hello, ${name}!`);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
greet('World');
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Features
|
|
339
|
+
|
|
340
|
+
- Fast rendering
|
|
341
|
+
- Real-time updates
|
|
342
|
+
- Syntax highlighting
|
|
343
|
+
|
|
344
|
+
That's all folks!</textarea>
|
|
345
|
+
|
|
346
|
+
<div class="layout">
|
|
347
|
+
<div class="panel">
|
|
348
|
+
<h2>Streaming Output</h2>
|
|
349
|
+
<div class="output-container">
|
|
350
|
+
<div id="streaming-output">
|
|
351
|
+
<div id="streaming-blocks"></div>
|
|
352
|
+
<span id="streaming-pending" class="streaming-pending"></span>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
<div class="status-bar">
|
|
356
|
+
<div class="status-item">
|
|
357
|
+
<span class="label">Status:</span>
|
|
358
|
+
<span class="value" id="status-streaming">Idle</span>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="status-item">
|
|
361
|
+
<span class="label">Blocks:</span>
|
|
362
|
+
<span class="value" id="status-blocks">0</span>
|
|
363
|
+
</div>
|
|
364
|
+
<div class="status-item">
|
|
365
|
+
<span class="label">Events:</span>
|
|
366
|
+
<span class="value" id="status-events">0</span>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div class="panel">
|
|
372
|
+
<h2>Event Log</h2>
|
|
373
|
+
<div class="output-container" id="console-log"></div>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
<script>
|
|
378
|
+
// Presets - designed to test edge cases with streaming blocks
|
|
379
|
+
const PRESETS = {
|
|
380
|
+
simple: `This is a simple paragraph that will be streamed character by character.`,
|
|
381
|
+
|
|
382
|
+
code: `\`\`\`javascript
|
|
383
|
+
function fibonacci(n) {
|
|
384
|
+
if (n <= 1) return n;
|
|
385
|
+
return fibonacci(n - 1) + fibonacci(n - 2);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Calculate first 10 numbers
|
|
389
|
+
for (let i = 0; i < 10; i++) {
|
|
390
|
+
console.log(\`fib(\${i}) = \${fibonacci(i)}\`);
|
|
391
|
+
}
|
|
392
|
+
\`\`\``,
|
|
393
|
+
|
|
394
|
+
// This preset specifically tests the issue: text before code block
|
|
395
|
+
textThenCode: `Here is some text before the code block
|
|
396
|
+
\`\`\`javascript
|
|
397
|
+
const x = 1;
|
|
398
|
+
const y = 2;
|
|
399
|
+
console.log(x + y);
|
|
400
|
+
\`\`\`
|
|
401
|
+
|
|
402
|
+
And some text after.`,
|
|
403
|
+
|
|
404
|
+
// This preset tests text before list items
|
|
405
|
+
textThenList: `Here is some text before the list
|
|
406
|
+
- First item
|
|
407
|
+
- Second item
|
|
408
|
+
- Third item
|
|
409
|
+
|
|
410
|
+
And some text after the list.`,
|
|
411
|
+
|
|
412
|
+
mixed: `# Welcome to the Demo
|
|
413
|
+
|
|
414
|
+
This is a **bold** statement with *italics* too.
|
|
415
|
+
|
|
416
|
+
## Code Example
|
|
417
|
+
|
|
418
|
+
\`\`\`python
|
|
419
|
+
def hello():
|
|
420
|
+
print("Hello, World!")
|
|
421
|
+
\`\`\`
|
|
422
|
+
|
|
423
|
+
## Features
|
|
424
|
+
|
|
425
|
+
1. First item
|
|
426
|
+
2. Second item
|
|
427
|
+
3. Third item
|
|
428
|
+
|
|
429
|
+
> This is a blockquote
|
|
430
|
+
|
|
431
|
+
Done!`,
|
|
432
|
+
|
|
433
|
+
rapid: `Quick.Fast.Speedy.Rapid.Swift.Nimble.Brisk.Hasty.Fleet.Prompt.`,
|
|
434
|
+
|
|
435
|
+
long: `# The Complete Guide to Everything
|
|
436
|
+
|
|
437
|
+
## Chapter 1: Introduction
|
|
438
|
+
|
|
439
|
+
Welcome to this comprehensive guide. We'll cover many topics in detail.
|
|
440
|
+
|
|
441
|
+
### Background
|
|
442
|
+
|
|
443
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
444
|
+
|
|
445
|
+
### Objectives
|
|
446
|
+
|
|
447
|
+
- Learn the fundamentals
|
|
448
|
+
- Master advanced techniques
|
|
449
|
+
- Apply knowledge in practice
|
|
450
|
+
|
|
451
|
+
## Chapter 2: Getting Started
|
|
452
|
+
|
|
453
|
+
First, let's set up our environment:
|
|
454
|
+
|
|
455
|
+
\`\`\`bash
|
|
456
|
+
npm install
|
|
457
|
+
npm run dev
|
|
458
|
+
\`\`\`
|
|
459
|
+
|
|
460
|
+
Then configure your settings:
|
|
461
|
+
|
|
462
|
+
\`\`\`json
|
|
463
|
+
{
|
|
464
|
+
"debug": true,
|
|
465
|
+
"verbose": false,
|
|
466
|
+
"timeout": 5000
|
|
467
|
+
}
|
|
468
|
+
\`\`\`
|
|
469
|
+
|
|
470
|
+
## Chapter 3: Advanced Topics
|
|
471
|
+
|
|
472
|
+
This section covers more complex scenarios.
|
|
473
|
+
|
|
474
|
+
### Performance Optimization
|
|
475
|
+
|
|
476
|
+
1. Use caching
|
|
477
|
+
2. Minimize re-renders
|
|
478
|
+
3. Lazy load components
|
|
479
|
+
|
|
480
|
+
### Best Practices
|
|
481
|
+
|
|
482
|
+
> Always write clean, maintainable code.
|
|
483
|
+
|
|
484
|
+
## Conclusion
|
|
485
|
+
|
|
486
|
+
Thanks for reading! Now go build something amazing.`
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
// State
|
|
490
|
+
let isStreaming = false;
|
|
491
|
+
let abortController = null;
|
|
492
|
+
let currentBlocks = new Map();
|
|
493
|
+
let maxBlockIndex = -1;
|
|
494
|
+
let totalEvents = 0;
|
|
495
|
+
|
|
496
|
+
// DOM refs
|
|
497
|
+
const blocksContainer = document.getElementById('streaming-blocks');
|
|
498
|
+
const pendingEl = document.getElementById('streaming-pending');
|
|
499
|
+
const consoleLog = document.getElementById('console-log');
|
|
500
|
+
const markdownInput = document.getElementById('markdown-input');
|
|
501
|
+
const speedSlider = document.getElementById('speed');
|
|
502
|
+
const chunkSizeSlider = document.getElementById('chunk-size');
|
|
503
|
+
const speedValue = document.getElementById('speed-value');
|
|
504
|
+
const chunkSizeValue = document.getElementById('chunk-size-value');
|
|
505
|
+
const streamBtn = document.getElementById('stream-btn');
|
|
506
|
+
const stopBtn = document.getElementById('stop-btn');
|
|
507
|
+
const resetBtn = document.getElementById('reset-btn');
|
|
508
|
+
const clearLogBtn = document.getElementById('clear-log-btn');
|
|
509
|
+
const statusStreaming = document.getElementById('status-streaming');
|
|
510
|
+
const statusBlocks = document.getElementById('status-blocks');
|
|
511
|
+
const statusEvents = document.getElementById('status-events');
|
|
512
|
+
|
|
513
|
+
// Update slider displays
|
|
514
|
+
speedSlider.addEventListener('input', () => {
|
|
515
|
+
speedValue.textContent = `${speedSlider.value}ms`;
|
|
516
|
+
});
|
|
517
|
+
chunkSizeSlider.addEventListener('input', () => {
|
|
518
|
+
chunkSizeValue.textContent = chunkSizeSlider.value;
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
// Logging
|
|
522
|
+
function log(message, type = 'event') {
|
|
523
|
+
const entry = document.createElement('div');
|
|
524
|
+
entry.className = `log-entry ${type}`;
|
|
525
|
+
const time = new Date().toISOString().split('T')[1].split('.')[0];
|
|
526
|
+
entry.innerHTML = `<span class="log-time">${time}</span>${escapeHtml(message)}`;
|
|
527
|
+
consoleLog.appendChild(entry);
|
|
528
|
+
consoleLog.scrollTop = consoleLog.scrollHeight;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
function escapeHtml(text) {
|
|
532
|
+
const div = document.createElement('div');
|
|
533
|
+
div.textContent = text;
|
|
534
|
+
return div.innerHTML;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Update status display
|
|
538
|
+
function updateStatus() {
|
|
539
|
+
statusStreaming.textContent = isStreaming ? 'Streaming' : 'Idle';
|
|
540
|
+
statusStreaming.className = `value ${isStreaming ? 'streaming' : ''}`;
|
|
541
|
+
statusBlocks.textContent = currentBlocks.size;
|
|
542
|
+
statusEvents.textContent = totalEvents;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// Handle augment event (same logic as useStreamingMarkdown.ts)
|
|
546
|
+
function onAugment(augment) {
|
|
547
|
+
const { blockIndex, html, type } = augment;
|
|
548
|
+
totalEvents++;
|
|
549
|
+
|
|
550
|
+
log(`AUGMENT: blockIndex=${blockIndex}, type=${type}, html=${html.substring(0, 80)}...`, 'augment');
|
|
551
|
+
|
|
552
|
+
// Check if block exists (dedupe/update)
|
|
553
|
+
if (currentBlocks.has(blockIndex)) {
|
|
554
|
+
const existingBlock = currentBlocks.get(blockIndex);
|
|
555
|
+
existingBlock.innerHTML = html;
|
|
556
|
+
log(` -> Updated existing block ${blockIndex}`, 'augment');
|
|
557
|
+
updateStatus();
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// Create new block element
|
|
562
|
+
const blockElement = document.createElement('div');
|
|
563
|
+
blockElement.className = 'streaming-block';
|
|
564
|
+
blockElement.dataset.blockIndex = String(blockIndex);
|
|
565
|
+
blockElement.innerHTML = html;
|
|
566
|
+
|
|
567
|
+
// Insert in correct order by blockIndex
|
|
568
|
+
if (blockIndex > maxBlockIndex) {
|
|
569
|
+
// Newest block - append to end
|
|
570
|
+
blocksContainer.appendChild(blockElement);
|
|
571
|
+
maxBlockIndex = blockIndex;
|
|
572
|
+
log(` -> Appended block ${blockIndex} to end`, 'augment');
|
|
573
|
+
} else {
|
|
574
|
+
// Out-of-order block - find correct position
|
|
575
|
+
let inserted = false;
|
|
576
|
+
const children = blocksContainer.children;
|
|
577
|
+
for (let i = 0; i < children.length; i++) {
|
|
578
|
+
const child = children[i];
|
|
579
|
+
const childIndex = parseInt(child.dataset.blockIndex ?? '-1', 10);
|
|
580
|
+
if (childIndex > blockIndex) {
|
|
581
|
+
blocksContainer.insertBefore(blockElement, child);
|
|
582
|
+
inserted = true;
|
|
583
|
+
log(` -> Inserted block ${blockIndex} before block ${childIndex}`, 'augment');
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
if (!inserted) {
|
|
588
|
+
blocksContainer.appendChild(blockElement);
|
|
589
|
+
log(` -> Appended block ${blockIndex} (fallback)`, 'augment');
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
currentBlocks.set(blockIndex, blockElement);
|
|
594
|
+
updateStatus();
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// Handle pending event
|
|
598
|
+
function onPending(pending) {
|
|
599
|
+
const { html } = pending;
|
|
600
|
+
totalEvents++;
|
|
601
|
+
pendingEl.innerHTML = html;
|
|
602
|
+
if (html) {
|
|
603
|
+
log(`PENDING: "${html.substring(0, 80)}${html.length > 80 ? '...' : ''}"`, 'pending');
|
|
604
|
+
}
|
|
605
|
+
updateStatus();
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// Reset state
|
|
609
|
+
function reset() {
|
|
610
|
+
log('RESET: Clearing all state', 'event');
|
|
611
|
+
blocksContainer.innerHTML = '';
|
|
612
|
+
pendingEl.innerHTML = '';
|
|
613
|
+
currentBlocks.clear();
|
|
614
|
+
maxBlockIndex = -1;
|
|
615
|
+
totalEvents = 0;
|
|
616
|
+
isStreaming = false;
|
|
617
|
+
abortController = null;
|
|
618
|
+
updateStatus();
|
|
619
|
+
streamBtn.disabled = false;
|
|
620
|
+
stopBtn.disabled = true;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// Stream markdown via server endpoint
|
|
624
|
+
async function streamMarkdown() {
|
|
625
|
+
const markdown = markdownInput.value;
|
|
626
|
+
const delayMs = parseInt(speedSlider.value);
|
|
627
|
+
const chunkSize = parseInt(chunkSizeSlider.value);
|
|
628
|
+
|
|
629
|
+
if (!markdown.trim()) {
|
|
630
|
+
log('ERROR: No markdown to stream', 'error');
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
reset();
|
|
635
|
+
isStreaming = true;
|
|
636
|
+
abortController = new AbortController();
|
|
637
|
+
streamBtn.disabled = true;
|
|
638
|
+
stopBtn.disabled = false;
|
|
639
|
+
updateStatus();
|
|
640
|
+
|
|
641
|
+
log(`Starting server-side stream: delayMs=${delayMs}, chunkSize=${chunkSize}`, 'event');
|
|
642
|
+
|
|
643
|
+
try {
|
|
644
|
+
const response = await fetch('/api/debug/stream-markdown', {
|
|
645
|
+
method: 'POST',
|
|
646
|
+
headers: {
|
|
647
|
+
'Content-Type': 'application/json',
|
|
648
|
+
'X-Yep-Anywhere': 'true',
|
|
649
|
+
},
|
|
650
|
+
body: JSON.stringify({ markdown, chunkSize, delayMs }),
|
|
651
|
+
signal: abortController.signal,
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
if (!response.ok) {
|
|
655
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
const reader = response.body.getReader();
|
|
659
|
+
const decoder = new TextDecoder();
|
|
660
|
+
let buffer = '';
|
|
661
|
+
|
|
662
|
+
while (true) {
|
|
663
|
+
const { done, value } = await reader.read();
|
|
664
|
+
if (done) break;
|
|
665
|
+
|
|
666
|
+
buffer += decoder.decode(value, { stream: true });
|
|
667
|
+
|
|
668
|
+
// Process complete SSE events
|
|
669
|
+
const lines = buffer.split('\n');
|
|
670
|
+
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
671
|
+
|
|
672
|
+
let eventType = '';
|
|
673
|
+
let eventData = '';
|
|
674
|
+
|
|
675
|
+
for (const line of lines) {
|
|
676
|
+
if (line.startsWith('event:')) {
|
|
677
|
+
eventType = line.slice(6).trim();
|
|
678
|
+
} else if (line.startsWith('data:')) {
|
|
679
|
+
eventData = line.slice(5).trim();
|
|
680
|
+
} else if (line === '' && eventType && eventData) {
|
|
681
|
+
// End of event
|
|
682
|
+
try {
|
|
683
|
+
const data = JSON.parse(eventData);
|
|
684
|
+
|
|
685
|
+
if (eventType === 'markdown-augment') {
|
|
686
|
+
onAugment(data);
|
|
687
|
+
} else if (eventType === 'pending') {
|
|
688
|
+
onPending(data);
|
|
689
|
+
} else if (eventType === 'done') {
|
|
690
|
+
log(`DONE: Total events from server: ${data.totalEvents}`, 'event');
|
|
691
|
+
}
|
|
692
|
+
} catch (e) {
|
|
693
|
+
log(`ERROR parsing event: ${e.message}`, 'error');
|
|
694
|
+
}
|
|
695
|
+
eventType = '';
|
|
696
|
+
eventData = '';
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
log('Stream completed', 'event');
|
|
702
|
+
} catch (err) {
|
|
703
|
+
if (err.name === 'AbortError') {
|
|
704
|
+
log('Stream aborted by user', 'event');
|
|
705
|
+
} else {
|
|
706
|
+
log(`ERROR: ${err.message}`, 'error');
|
|
707
|
+
}
|
|
708
|
+
} finally {
|
|
709
|
+
isStreaming = false;
|
|
710
|
+
abortController = null;
|
|
711
|
+
streamBtn.disabled = false;
|
|
712
|
+
stopBtn.disabled = true;
|
|
713
|
+
updateStatus();
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// Event listeners
|
|
718
|
+
streamBtn.addEventListener('click', streamMarkdown);
|
|
719
|
+
stopBtn.addEventListener('click', () => {
|
|
720
|
+
if (abortController) {
|
|
721
|
+
abortController.abort();
|
|
722
|
+
log('Stop requested...', 'event');
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
resetBtn.addEventListener('click', reset);
|
|
726
|
+
clearLogBtn.addEventListener('click', () => {
|
|
727
|
+
consoleLog.innerHTML = '';
|
|
728
|
+
log('Log cleared', 'event');
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
// Preset buttons
|
|
732
|
+
document.querySelectorAll('.preset-btn').forEach(btn => {
|
|
733
|
+
btn.addEventListener('click', () => {
|
|
734
|
+
const preset = btn.dataset.preset;
|
|
735
|
+
if (PRESETS[preset]) {
|
|
736
|
+
markdownInput.value = PRESETS[preset];
|
|
737
|
+
log(`Loaded preset: ${preset}`, 'event');
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
// Initial log
|
|
743
|
+
log('Debug harness ready (using server-side StreamCoordinator). Enter markdown and click Stream.', 'event');
|
|
744
|
+
</script>
|
|
745
|
+
</body>
|
|
746
|
+
</html>
|