@pennyfarthing/cyclist 10.4.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/agent-load.d.ts +1 -2
- package/dist/api/agent-load.d.ts.map +1 -1
- package/dist/api/agent-load.js +2 -123
- package/dist/api/agent-load.js.map +1 -1
- package/dist/api/audit-log.d.ts +1 -17
- package/dist/api/audit-log.d.ts.map +1 -1
- package/dist/api/audit-log.js +2 -162
- package/dist/api/audit-log.js.map +1 -1
- package/dist/api/background-tasks.d.ts +1 -26
- package/dist/api/background-tasks.d.ts.map +1 -1
- package/dist/api/background-tasks.js +2 -55
- package/dist/api/background-tasks.js.map +1 -1
- package/dist/api/bell.d.ts +1 -18
- package/dist/api/bell.d.ts.map +1 -1
- package/dist/api/bell.js +2 -33
- package/dist/api/bell.js.map +1 -1
- package/dist/api/code-markers.d.ts +1 -8
- package/dist/api/code-markers.d.ts.map +1 -1
- package/dist/api/code-markers.js +2 -61
- package/dist/api/code-markers.js.map +1 -1
- package/dist/api/complexity.d.ts +1 -2
- package/dist/api/complexity.d.ts.map +1 -1
- package/dist/api/complexity.js +2 -46
- package/dist/api/complexity.js.map +1 -1
- package/dist/api/context.d.ts +1 -37
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +2 -143
- package/dist/api/context.js.map +1 -1
- package/dist/api/dead-code.d.ts +1 -2
- package/dist/api/dead-code.d.ts.map +1 -1
- package/dist/api/dead-code.js +2 -69
- package/dist/api/dead-code.js.map +1 -1
- package/dist/api/dependencies.d.ts +1 -2
- package/dist/api/dependencies.d.ts.map +1 -1
- package/dist/api/dependencies.js +2 -42
- package/dist/api/dependencies.js.map +1 -1
- package/dist/api/evaluation.d.ts +1 -19
- package/dist/api/evaluation.d.ts.map +1 -1
- package/dist/api/evaluation.js +2 -127
- package/dist/api/evaluation.js.map +1 -1
- package/dist/api/file-browser.d.ts +1 -8
- package/dist/api/file-browser.d.ts.map +1 -1
- package/dist/api/file-browser.js +2 -114
- package/dist/api/file-browser.js.map +1 -1
- package/dist/api/git.d.ts +1 -46
- package/dist/api/git.d.ts.map +1 -1
- package/dist/api/git.js +2 -354
- package/dist/api/git.js.map +1 -1
- package/dist/api/health-score.d.ts +1 -2
- package/dist/api/health-score.d.ts.map +1 -1
- package/dist/api/health-score.js +2 -46
- package/dist/api/health-score.js.map +1 -1
- package/dist/api/hook-request.d.ts +1 -40
- package/dist/api/hook-request.d.ts.map +1 -1
- package/dist/api/hook-request.js +2 -277
- package/dist/api/hook-request.js.map +1 -1
- package/dist/api/hotspots.d.ts +1 -2
- package/dist/api/hotspots.d.ts.map +1 -1
- package/dist/api/hotspots.js +2 -61
- package/dist/api/hotspots.js.map +1 -1
- package/dist/api/identity.d.ts +1 -16
- package/dist/api/identity.d.ts.map +1 -1
- package/dist/api/identity.js +2 -78
- package/dist/api/identity.js.map +1 -1
- package/dist/api/index.d.ts +1 -34
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -44
- package/dist/api/index.js.map +1 -1
- package/dist/api/mode.d.ts +1 -22
- package/dist/api/mode.d.ts.map +1 -1
- package/dist/api/mode.js +2 -37
- package/dist/api/mode.js.map +1 -1
- package/dist/api/otlp.d.ts +1 -2
- package/dist/api/otlp.d.ts.map +1 -1
- package/dist/api/otlp.js +2 -46
- package/dist/api/otlp.js.map +1 -1
- package/dist/api/permissions.d.ts +1 -15
- package/dist/api/permissions.d.ts.map +1 -1
- package/dist/api/permissions.js +2 -66
- package/dist/api/permissions.js.map +1 -1
- package/dist/api/persona.d.ts +1 -8
- package/dist/api/persona.d.ts.map +1 -1
- package/dist/api/persona.js +2 -67
- package/dist/api/persona.js.map +1 -1
- package/dist/api/portrait.d.ts +1 -5
- package/dist/api/portrait.d.ts.map +1 -1
- package/dist/api/portrait.js +2 -27
- package/dist/api/portrait.js.map +1 -1
- package/dist/api/settings.d.ts +1 -53
- package/dist/api/settings.d.ts.map +1 -1
- package/dist/api/settings.js +2 -464
- package/dist/api/settings.js.map +1 -1
- package/dist/api/spans.d.ts +1 -16
- package/dist/api/spans.d.ts.map +1 -1
- package/dist/api/spans.js +2 -244
- package/dist/api/spans.js.map +1 -1
- package/dist/api/stats.d.ts +1 -12
- package/dist/api/stats.d.ts.map +1 -1
- package/dist/api/stats.js +2 -84
- package/dist/api/stats.js.map +1 -1
- package/dist/api/story.d.ts +1 -2
- package/dist/api/story.d.ts.map +1 -1
- package/dist/api/story.js +2 -14
- package/dist/api/story.js.map +1 -1
- package/dist/api/telemetry.d.ts +1 -18
- package/dist/api/telemetry.d.ts.map +1 -1
- package/dist/api/telemetry.js +2 -164
- package/dist/api/telemetry.js.map +1 -1
- package/dist/api/theme-agents.d.ts +1 -60
- package/dist/api/theme-agents.d.ts.map +1 -1
- package/dist/api/theme-agents.js +2 -213
- package/dist/api/theme-agents.js.map +1 -1
- package/dist/api/todos.d.ts +1 -32
- package/dist/api/todos.d.ts.map +1 -1
- package/dist/api/todos.js +2 -43
- package/dist/api/todos.js.map +1 -1
- package/dist/api/token-stats.d.ts +1 -7
- package/dist/api/token-stats.d.ts.map +1 -1
- package/dist/api/token-stats.js +2 -35
- package/dist/api/token-stats.js.map +1 -1
- package/dist/api/welcome.d.ts +1 -21
- package/dist/api/welcome.d.ts.map +1 -1
- package/dist/api/welcome.js +2 -34
- package/dist/api/welcome.js.map +1 -1
- package/dist/bikerack.js +2 -2
- package/dist/bikerack.js.map +1 -1
- package/dist/env.d.ts +6 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +10 -0
- package/dist/env.js.map +1 -0
- package/dist/focus.d.ts +53 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/focus.js +122 -0
- package/dist/focus.js.map +1 -0
- package/dist/git-cache.d.ts +1 -0
- package/dist/git-cache.d.ts.map +1 -1
- package/dist/git-cache.js +3 -1
- package/dist/git-cache.js.map +1 -1
- package/dist/menu-builder.d.ts.map +1 -1
- package/dist/menu-builder.js +0 -1
- package/dist/menu-builder.js.map +1 -1
- package/dist/prime.d.ts +3 -3
- package/dist/prime.d.ts.map +1 -1
- package/dist/prime.js +38 -14
- package/dist/prime.js.map +1 -1
- package/dist/public/css/react.css +1 -1
- package/dist/public/js/react/react.js +53 -61
- package/dist/server.d.ts +18 -85
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +105 -405
- package/dist/server.js.map +1 -1
- package/dist/sprint-data.d.ts +1 -1
- package/dist/sprint-data.d.ts.map +1 -1
- package/dist/sprint-data.js +2 -2
- package/dist/sprint-data.js.map +1 -1
- package/dist/theme-metadata.d.ts +3 -3
- package/dist/theme-metadata.d.ts.map +1 -1
- package/dist/theme-metadata.js +4 -4
- package/dist/theme-metadata.js.map +1 -1
- package/dist/websocket.d.ts +2 -0
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +53 -75
- package/dist/websocket.js.map +1 -1
- package/package.json +2 -6
- package/portraits/hogans-heroes/large/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/large/carter-34352.png +0 -0
- package/portraits/hogans-heroes/large/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/large/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/large/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/large/klink-23434.png +0 -0
- package/portraits/hogans-heroes/large/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/large/marya-53543.png +0 -0
- package/portraits/hogans-heroes/large/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/large/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/large/underground-55131.png +0 -0
- package/portraits/hogans-heroes/medium/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/medium/carter-34352.png +0 -0
- package/portraits/hogans-heroes/medium/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/medium/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/medium/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/medium/klink-23434.png +0 -0
- package/portraits/hogans-heroes/medium/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/medium/marya-53543.png +0 -0
- package/portraits/hogans-heroes/medium/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/medium/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/medium/underground-55131.png +0 -0
- package/portraits/monty-python/large/announcer-44441.png +0 -0
- package/portraits/monty-python/large/arguer-35412.png +0 -0
- package/portraits/monty-python/large/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/large/colonel-35423.png +0 -0
- package/portraits/monty-python/large/counsellor-45341.png +0 -0
- package/portraits/monty-python/large/gumbys-23524.png +0 -0
- package/portraits/monty-python/large/nudge-43533.png +0 -0
- package/portraits/monty-python/large/praline-45413.png +0 -0
- package/portraits/monty-python/large/silly-walks-55322.png +0 -0
- package/portraits/monty-python/large/wensleydale-54451.png +0 -0
- package/portraits/monty-python/large/xim-nez-43534.png +0 -0
- package/portraits/monty-python/medium/announcer-44441.png +0 -0
- package/portraits/monty-python/medium/arguer-35412.png +0 -0
- package/portraits/monty-python/medium/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/medium/colonel-35423.png +0 -0
- package/portraits/monty-python/medium/counsellor-45341.png +0 -0
- package/portraits/monty-python/medium/gumbys-23524.png +0 -0
- package/portraits/monty-python/medium/nudge-43533.png +0 -0
- package/portraits/monty-python/medium/praline-45413.png +0 -0
- package/portraits/monty-python/medium/silly-walks-55322.png +0 -0
- package/portraits/monty-python/medium/wensleydale-54451.png +0 -0
- package/portraits/monty-python/medium/xim-nez-43534.png +0 -0
- package/portraits/stephen-king/large/andy-55231.png +0 -0
- package/portraits/stephen-king/large/christine-25112.png +0 -0
- package/portraits/stephen-king/large/danny-53243.png +0 -0
- package/portraits/stephen-king/large/flagg-55311.png +0 -0
- package/portraits/stephen-king/large/gaunt-54421.png +0 -0
- package/portraits/stephen-king/large/jack-44224.png +0 -0
- package/portraits/stephen-king/large/johnny-44353.png +0 -0
- package/portraits/stephen-king/large/margaret-15415.png +0 -0
- package/portraits/stephen-king/large/paul-45233.png +0 -0
- package/portraits/stephen-king/large/pennywise-54411.png +0 -0
- package/portraits/stephen-king/large/roland-35121.png +0 -0
- package/portraits/stephen-king/medium/andy-55231.png +0 -0
- package/portraits/stephen-king/medium/christine-25112.png +0 -0
- package/portraits/stephen-king/medium/danny-53243.png +0 -0
- package/portraits/stephen-king/medium/flagg-55311.png +0 -0
- package/portraits/stephen-king/medium/gaunt-54421.png +0 -0
- package/portraits/stephen-king/medium/jack-44224.png +0 -0
- package/portraits/stephen-king/medium/johnny-44353.png +0 -0
- package/portraits/stephen-king/medium/margaret-15415.png +0 -0
- package/portraits/stephen-king/medium/paul-45233.png +0 -0
- package/portraits/stephen-king/medium/pennywise-54411.png +0 -0
- package/portraits/stephen-king/medium/roland-35121.png +0 -0
- package/portraits/star-trek-tng/large/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/large/data-55241.png +0 -0
- package/portraits/star-trek-tng/large/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/large/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/large/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/large/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/large/miles-35342.png +0 -0
- package/portraits/star-trek-tng/large/q-53521.png +0 -0
- package/portraits/star-trek-tng/large/spock-45231.png +0 -0
- package/portraits/star-trek-tng/large/troi-44352.png +0 -0
- package/portraits/star-trek-tng/medium/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/medium/data-55241.png +0 -0
- package/portraits/star-trek-tng/medium/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/medium/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/medium/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/medium/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/medium/miles-35342.png +0 -0
- package/portraits/star-trek-tng/medium/q-53521.png +0 -0
- package/portraits/star-trek-tng/medium/spock-45231.png +0 -0
- package/portraits/star-trek-tng/medium/troi-44352.png +0 -0
- package/src/public/App.tsx +0 -340
- package/src/public/components/AgentLoadDialog.tsx +0 -202
- package/src/public/components/AgentPopup.tsx +0 -308
- package/src/public/components/ApprovalModal/ApprovalModal.css +0 -35
- package/src/public/components/ApprovalModal/index.tsx +0 -632
- package/src/public/components/BikeRackIndex.tsx +0 -54
- package/src/public/components/BikeRackWorkspace.tsx +0 -142
- package/src/public/components/CommandPalette.tsx +0 -555
- package/src/public/components/ConfirmDialog.tsx +0 -168
- package/src/public/components/ContextIndicator/ContextIndicator.css +0 -85
- package/src/public/components/ContextIndicator/index.tsx +0 -330
- package/src/public/components/ContextSparkline.tsx +0 -56
- package/src/public/components/ControlBar.tsx +0 -636
- package/src/public/components/DeadCodeDialog.tsx +0 -169
- package/src/public/components/DiffViewer.tsx +0 -585
- package/src/public/components/DockviewWorkspace.tsx +0 -737
- package/src/public/components/Editor.tsx +0 -630
- package/src/public/components/ErrorBoundary.tsx +0 -67
- package/src/public/components/FileTree.tsx +0 -379
- package/src/public/components/FontPicker/FontPicker.css +0 -276
- package/src/public/components/FontPicker/index.tsx +0 -430
- package/src/public/components/FullFileTree.tsx +0 -237
- package/src/public/components/HealthGauge.tsx +0 -181
- package/src/public/components/Message.tsx +0 -225
- package/src/public/components/MessageList.tsx +0 -98
- package/src/public/components/MessageView.tsx +0 -400
- package/src/public/components/ModeSwitch/ModeSwitch.css +0 -165
- package/src/public/components/ModeSwitch/index.tsx +0 -372
- package/src/public/components/PersonaHeader.tsx +0 -240
- package/src/public/components/QuickActions.tsx +0 -267
- package/src/public/components/SpanTimeline.tsx +0 -352
- package/src/public/components/StandalonePanel.tsx +0 -84
- package/src/public/components/StatsStrip.tsx +0 -162
- package/src/public/components/StreamingContent.tsx +0 -77
- package/src/public/components/SubagentSpan.tsx +0 -180
- package/src/public/components/TandemPortrait.tsx +0 -72
- package/src/public/components/ThemePalette/ThemePalette.css +0 -179
- package/src/public/components/ThemePalette/index.tsx +0 -326
- package/src/public/components/ToolCallBlock.tsx +0 -252
- package/src/public/components/ToolStack.tsx +0 -209
- package/src/public/components/ToolStatus.tsx +0 -57
- package/src/public/components/dialogs/CodeMarkersDialog.tsx +0 -169
- package/src/public/components/dialogs/ComplexityDialog.tsx +0 -163
- package/src/public/components/dialogs/DependenciesDialog.tsx +0 -120
- package/src/public/components/dialogs/HotspotsDialog.tsx +0 -451
- package/src/public/components/dialogs/ToolDialog.tsx +0 -43
- package/src/public/components/panel-registry.ts +0 -11
- package/src/public/components/panels/ACPanel.tsx +0 -93
- package/src/public/components/panels/AcceptanceCriteriaPanel.tsx +0 -104
- package/src/public/components/panels/AuditLogPanel.tsx +0 -465
- package/src/public/components/panels/BackgroundPanel.tsx +0 -115
- package/src/public/components/panels/BikeLanePanel.tsx +0 -214
- package/src/public/components/panels/ChangedPanel.tsx +0 -65
- package/src/public/components/panels/DebugPanel.tsx +0 -344
- package/src/public/components/panels/DiffsPanel.tsx +0 -155
- package/src/public/components/panels/GitPanel.tsx +0 -216
- package/src/public/components/panels/HotspotsPanel.tsx +0 -365
- package/src/public/components/panels/MessagePanel.tsx +0 -497
- package/src/public/components/panels/SettingsPanel.tsx +0 -453
- package/src/public/components/panels/SprintPanel.tsx +0 -670
- package/src/public/components/panels/TTYPanel.tsx +0 -299
- package/src/public/components/panels/TodoPanel.tsx +0 -142
- package/src/public/components/panels/WorkflowPanel.tsx +0 -224
- package/src/public/components/panels/index.ts +0 -24
- package/src/public/components/ui/alert-dialog.tsx +0 -139
- package/src/public/components/ui/badge.tsx +0 -36
- package/src/public/components/ui/button.tsx +0 -57
- package/src/public/components/ui/checkbox.tsx +0 -28
- package/src/public/components/ui/collapsible.tsx +0 -9
- package/src/public/components/ui/command.tsx +0 -151
- package/src/public/components/ui/dialog.tsx +0 -120
- package/src/public/components/ui/popover.tsx +0 -31
- package/src/public/components/ui/progress.tsx +0 -28
- package/src/public/components/ui/scroll-area.tsx +0 -46
- package/src/public/components/ui/select.tsx +0 -157
- package/src/public/components/ui/separator.tsx +0 -29
- package/src/public/components/ui/skeleton.tsx +0 -15
- package/src/public/components/ui/switch.tsx +0 -27
- package/src/public/components/ui/toggle-group.tsx +0 -59
- package/src/public/components/ui/toggle.tsx +0 -43
- package/src/public/components/ui/tooltip.tsx +0 -30
- package/src/public/contexts/ClaudeContext.tsx +0 -311
- package/src/public/contexts/MessageQueueContext.tsx +0 -143
- package/src/public/css/theme-browser.css +0 -550
- package/src/public/css/theme-system.css +0 -630
- package/src/public/hooks/index.ts +0 -49
- package/src/public/hooks/useAgentLoad.ts +0 -105
- package/src/public/hooks/useBackgroundTasks.ts +0 -131
- package/src/public/hooks/useClaude.ts +0 -234
- package/src/public/hooks/useCodeMarkers.ts +0 -101
- package/src/public/hooks/useColorScheme.ts +0 -42
- package/src/public/hooks/useCommandHistory.ts +0 -99
- package/src/public/hooks/useComplexity.ts +0 -80
- package/src/public/hooks/useDeadCode.ts +0 -99
- package/src/public/hooks/useDependencies.ts +0 -82
- package/src/public/hooks/useDiffs.ts +0 -143
- package/src/public/hooks/useFileBrowser.ts +0 -71
- package/src/public/hooks/useGitStatus.ts +0 -233
- package/src/public/hooks/useHealthScore.ts +0 -69
- package/src/public/hooks/useHotspots.ts +0 -123
- package/src/public/hooks/useLayoutPersistence.ts +0 -138
- package/src/public/hooks/useMarkdownParser.ts +0 -36
- package/src/public/hooks/useMarkerActions.ts +0 -234
- package/src/public/hooks/useMessageQueue.ts +0 -380
- package/src/public/hooks/useMessageStream.ts +0 -131
- package/src/public/hooks/usePersona.ts +0 -112
- package/src/public/hooks/usePlanModeExit.ts +0 -105
- package/src/public/hooks/useResponsiveLayout.ts +0 -173
- package/src/public/hooks/useSprint.ts +0 -147
- package/src/public/hooks/useStatsStrip.ts +0 -204
- package/src/public/hooks/useStory.ts +0 -135
- package/src/public/hooks/useSubagentHelper.ts +0 -64
- package/src/public/hooks/useSyntaxHighlighter.ts +0 -52
- package/src/public/hooks/useTabCompletion.ts +0 -124
- package/src/public/hooks/useTodos.ts +0 -93
- package/src/public/hooks/useUserAvatar.ts +0 -54
- package/src/public/index.tsx +0 -10
- package/src/public/lib/utils.ts +0 -6
- package/src/public/styles/dockview-theme.css +0 -459
- package/src/public/styles/tailwind.css +0 -4396
- package/src/public/types/electron.d.ts +0 -18
- package/src/public/types/message.ts +0 -51
- package/src/public/utils/avatar-service.ts +0 -73
- package/src/public/utils/color-presets.ts +0 -940
- package/src/public/utils/font-presets.ts +0 -362
- package/src/public/utils/formatDuration.ts +0 -14
- package/src/public/utils/markdown.ts +0 -249
- package/src/public/utils/messageFilters.ts +0 -128
- package/src/public/utils/slash-commands.ts +0 -353
- package/src/public/utils/subagent-display.ts +0 -146
- package/src/public/utils/syntax.ts +0 -219
- package/src/public/utils/toolIntentSummarizer.ts +0 -199
- package/src/public/utils/toolStackGrouper.ts +0 -106
- package/src/public/utils/toolTypeColors.ts +0 -45
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useStory Hook
|
|
3
|
-
*
|
|
4
|
-
* React hook for subscribing to story/sprint data.
|
|
5
|
-
* Story MSSCI-12717 - React Migration
|
|
6
|
-
* Story MSSCI-12860 - IPC to WebSocket Migration (Phase 1)
|
|
7
|
-
*
|
|
8
|
-
* Uses WebSocket /ws/story for real-time updates (no polling).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { useState, useEffect, useRef } from 'react';
|
|
12
|
-
|
|
13
|
-
// Import types from story-parser for criteria and workflow
|
|
14
|
-
import type { CriteriaItem, WorkflowPhase, AvailableWorkflow } from '../../../story-parser.js';
|
|
15
|
-
|
|
16
|
-
export interface StoryData {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
status?: string;
|
|
20
|
-
phase?: string;
|
|
21
|
-
workflow?: string;
|
|
22
|
-
points?: number;
|
|
23
|
-
epic?: string;
|
|
24
|
-
// MSSCI-12849: AC and BikeLane panel data
|
|
25
|
-
criteria?: CriteriaItem[] | null;
|
|
26
|
-
workflowPhases?: WorkflowPhase[] | null;
|
|
27
|
-
// MSSCI-14300: Distinguish phased vs stepped workflow rendering
|
|
28
|
-
workflowType?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Re-export types for panel components
|
|
32
|
-
export type { CriteriaItem, WorkflowPhase, AvailableWorkflow };
|
|
33
|
-
|
|
34
|
-
interface UseStoryResult {
|
|
35
|
-
story: StoryData | null;
|
|
36
|
-
isLoading: boolean;
|
|
37
|
-
error: Error | null;
|
|
38
|
-
// MSSCI-14301: Available workflows for discovery panel
|
|
39
|
-
availableWorkflows: AvailableWorkflow[] | null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** WebSocket message format from /ws/story */
|
|
43
|
-
interface StoryMessage {
|
|
44
|
-
type: 'init' | 'update';
|
|
45
|
-
id: string | null;
|
|
46
|
-
title: string | null;
|
|
47
|
-
phase?: string | null;
|
|
48
|
-
status?: string | null;
|
|
49
|
-
points?: number | null;
|
|
50
|
-
workflow?: WorkflowPhase[] | null;
|
|
51
|
-
workflowType?: string | null;
|
|
52
|
-
criteria?: CriteriaItem[] | null;
|
|
53
|
-
availableWorkflows?: AvailableWorkflow[] | null;
|
|
54
|
-
[key: string]: unknown;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Transform WebSocket message to StoryData */
|
|
58
|
-
function transformMessage(msg: StoryMessage): StoryData | null {
|
|
59
|
-
if (!msg.id) return null;
|
|
60
|
-
return {
|
|
61
|
-
id: msg.id,
|
|
62
|
-
title: msg.title ?? '',
|
|
63
|
-
status: msg.status ?? undefined,
|
|
64
|
-
phase: msg.phase ?? undefined,
|
|
65
|
-
points: msg.points ?? undefined,
|
|
66
|
-
criteria: msg.criteria,
|
|
67
|
-
workflowPhases: msg.workflow,
|
|
68
|
-
workflowType: msg.workflowType ?? undefined,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function useStory(): UseStoryResult {
|
|
73
|
-
const [story, setStory] = useState<StoryData | null>(null);
|
|
74
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
75
|
-
const [error, setError] = useState<Error | null>(null);
|
|
76
|
-
const [availableWorkflows, setAvailableWorkflows] = useState<AvailableWorkflow[] | null>(null);
|
|
77
|
-
const wsRef = useRef<WebSocket | null>(null);
|
|
78
|
-
const reconnectTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
|
79
|
-
|
|
80
|
-
useEffect(() => {
|
|
81
|
-
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
82
|
-
const wsUrl = `${protocol}//${window.location.host}/ws/story`;
|
|
83
|
-
|
|
84
|
-
const connect = () => {
|
|
85
|
-
try {
|
|
86
|
-
wsRef.current = new WebSocket(wsUrl);
|
|
87
|
-
|
|
88
|
-
wsRef.current.onopen = () => {
|
|
89
|
-
console.debug('[useStory] WebSocket connected');
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
wsRef.current.onmessage = (event) => {
|
|
93
|
-
try {
|
|
94
|
-
const msg = JSON.parse(event.data) as StoryMessage;
|
|
95
|
-
if (msg.type === 'init' || msg.type === 'update') {
|
|
96
|
-
setStory(transformMessage(msg));
|
|
97
|
-
setAvailableWorkflows(msg.availableWorkflows ?? null);
|
|
98
|
-
setIsLoading(false);
|
|
99
|
-
setError(null);
|
|
100
|
-
}
|
|
101
|
-
} catch (err) {
|
|
102
|
-
console.error('[useStory] Failed to parse message:', err);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
wsRef.current.onclose = () => {
|
|
107
|
-
console.debug('[useStory] WebSocket closed, reconnecting...');
|
|
108
|
-
reconnectTimeoutRef.current = setTimeout(connect, 2000);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
wsRef.current.onerror = (err) => {
|
|
112
|
-
console.error('[useStory] WebSocket error:', err);
|
|
113
|
-
setError(new Error('WebSocket connection failed'));
|
|
114
|
-
};
|
|
115
|
-
} catch (err) {
|
|
116
|
-
console.error('[useStory] WebSocket init failed:', err);
|
|
117
|
-
setError(err instanceof Error ? err : new Error('Failed to connect'));
|
|
118
|
-
setIsLoading(false);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
connect();
|
|
123
|
-
|
|
124
|
-
return () => {
|
|
125
|
-
if (reconnectTimeoutRef.current) {
|
|
126
|
-
clearTimeout(reconnectTimeoutRef.current);
|
|
127
|
-
}
|
|
128
|
-
if (wsRef.current) {
|
|
129
|
-
wsRef.current.close();
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}, []);
|
|
133
|
-
|
|
134
|
-
return { story, isLoading, error, availableWorkflows };
|
|
135
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useSubagentHelper Hook
|
|
3
|
-
*
|
|
4
|
-
* React hook for fetching themed helper data for subagent display.
|
|
5
|
-
* Story MSSCI-12776 - Theme-Aware Subagent Display Messages
|
|
6
|
-
*
|
|
7
|
-
* Combines persona lookup with helper resolution to provide
|
|
8
|
-
* themed helper information for subagent spans.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { useState, useEffect } from 'react';
|
|
12
|
-
import { getAgentHelper, Helper } from '../utils/subagent-display';
|
|
13
|
-
|
|
14
|
-
export type { Helper };
|
|
15
|
-
|
|
16
|
-
export interface UseSubagentHelperResult {
|
|
17
|
-
helper: Helper | null;
|
|
18
|
-
isLoading: boolean;
|
|
19
|
-
error: Error | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function useSubagentHelper(): UseSubagentHelperResult {
|
|
23
|
-
const [helper, setHelper] = useState<Helper | null>(null);
|
|
24
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
25
|
-
const [error, setError] = useState<Error | null>(null);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
const fetchHelper = async (role: string) => {
|
|
29
|
-
try {
|
|
30
|
-
const helperData = await getAgentHelper(role);
|
|
31
|
-
setHelper(helperData);
|
|
32
|
-
setIsLoading(false);
|
|
33
|
-
} catch (err) {
|
|
34
|
-
setError(err instanceof Error ? err : new Error('Failed to fetch helper'));
|
|
35
|
-
setIsLoading(false);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Connect to persona WebSocket for real-time updates
|
|
40
|
-
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
41
|
-
const ws = new WebSocket(`${protocol}//${window.location.host}/ws/persona`);
|
|
42
|
-
|
|
43
|
-
ws.onmessage = (event) => {
|
|
44
|
-
try {
|
|
45
|
-
const persona = JSON.parse(event.data) as { role?: string } | null;
|
|
46
|
-
if (persona?.role) {
|
|
47
|
-
fetchHelper(persona.role);
|
|
48
|
-
}
|
|
49
|
-
} catch (err) {
|
|
50
|
-
setError(err instanceof Error ? err : new Error('Failed to parse persona'));
|
|
51
|
-
setIsLoading(false);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
ws.onerror = () => {
|
|
56
|
-
setError(new Error('WebSocket connection failed'));
|
|
57
|
-
setIsLoading(false);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return () => ws.close();
|
|
61
|
-
}, []);
|
|
62
|
-
|
|
63
|
-
return { helper, isLoading, error };
|
|
64
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useSyntaxHighlighter Hook
|
|
3
|
-
*
|
|
4
|
-
* Story MSSCI-13970: React hook for syntax highlighting code blocks.
|
|
5
|
-
* Extracted from js/components/message-view/syntax-highlighter.js
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Multi-language support (JS/TS, Python, Go, Rust, Bash)
|
|
9
|
-
* - Tokenizer-based highlighting (keyword, string, comment, number, function)
|
|
10
|
-
* - Theme-aware via CSS variables
|
|
11
|
-
* - Memoization for performance
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { useMemo } from 'react';
|
|
15
|
-
import { highlightCode, isSupportedLanguage } from '../utils/syntax';
|
|
16
|
-
|
|
17
|
-
export interface UseSyntaxHighlighterResult {
|
|
18
|
-
/** HTML string with syntax highlighting spans */
|
|
19
|
-
highlighted: string;
|
|
20
|
-
/** Whether the language is supported for highlighting */
|
|
21
|
-
isSupported: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* React hook for syntax highlighting code blocks with memoization.
|
|
26
|
-
*
|
|
27
|
-
* @param code - Code to highlight (already HTML-escaped, or null)
|
|
28
|
-
* @param lang - Language identifier (js, ts, python, go, rust, bash, etc.)
|
|
29
|
-
* @returns Object with highlighted HTML and support status
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```tsx
|
|
33
|
-
* const { highlighted, isSupported } = useSyntaxHighlighter(code, 'typescript');
|
|
34
|
-
* return <pre dangerouslySetInnerHTML={{ __html: highlighted }} />;
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export function useSyntaxHighlighter(
|
|
38
|
-
code: string | null,
|
|
39
|
-
lang: string
|
|
40
|
-
): UseSyntaxHighlighterResult {
|
|
41
|
-
const isSupported = useMemo(() => {
|
|
42
|
-
return lang ? isSupportedLanguage(lang) : false;
|
|
43
|
-
}, [lang]);
|
|
44
|
-
|
|
45
|
-
const highlighted = useMemo(() => {
|
|
46
|
-
if (!code) return '';
|
|
47
|
-
if (!lang || !isSupported) return code;
|
|
48
|
-
return highlightCode(code, lang);
|
|
49
|
-
}, [code, lang, isSupported]);
|
|
50
|
-
|
|
51
|
-
return { highlighted, isSupported };
|
|
52
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useTabCompletion Hook
|
|
3
|
-
*
|
|
4
|
-
* React hook for slash command tab completion.
|
|
5
|
-
* Story MSSCI-12717 - React Migration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { useState, useCallback, useMemo } from 'react';
|
|
9
|
-
import { SLASH_COMMANDS, trackCommandUsage, filterCommands as filterCommandsWithFrequency, SlashCommand } from '../utils/slash-commands';
|
|
10
|
-
|
|
11
|
-
interface CompletionState {
|
|
12
|
-
visible: boolean;
|
|
13
|
-
commands: SlashCommand[];
|
|
14
|
-
selectedIndex: number;
|
|
15
|
-
prefix: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface UseTabCompletionResult {
|
|
19
|
-
state: CompletionState;
|
|
20
|
-
showCompletion: (prefix: string) => void;
|
|
21
|
-
hideCompletion: () => void;
|
|
22
|
-
updateCompletion: (prefix: string) => void;
|
|
23
|
-
navigateUp: () => void;
|
|
24
|
-
navigateDown: () => void;
|
|
25
|
-
selectCurrent: () => string | null;
|
|
26
|
-
isVisible: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function useTabCompletion(commands?: SlashCommand[]): UseTabCompletionResult {
|
|
30
|
-
const allCommands = useMemo(() => commands || SLASH_COMMANDS, [commands]);
|
|
31
|
-
|
|
32
|
-
const [state, setState] = useState<CompletionState>({
|
|
33
|
-
visible: false,
|
|
34
|
-
commands: [],
|
|
35
|
-
selectedIndex: 0,
|
|
36
|
-
prefix: '',
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const filterCommands = useCallback((prefix: string): SlashCommand[] => {
|
|
40
|
-
// Use frequency-aware filtering from slash-commands module
|
|
41
|
-
// Falls back to basic filtering if custom commands provided
|
|
42
|
-
if (commands) {
|
|
43
|
-
const search = prefix.toLowerCase();
|
|
44
|
-
return allCommands.filter(cmd =>
|
|
45
|
-
cmd.name.toLowerCase().startsWith(search)
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
return filterCommandsWithFrequency(prefix);
|
|
49
|
-
}, [allCommands, commands]);
|
|
50
|
-
|
|
51
|
-
const showCompletion = useCallback((prefix: string) => {
|
|
52
|
-
const filtered = filterCommands(prefix);
|
|
53
|
-
setState({
|
|
54
|
-
visible: true,
|
|
55
|
-
commands: filtered,
|
|
56
|
-
selectedIndex: 0,
|
|
57
|
-
prefix,
|
|
58
|
-
});
|
|
59
|
-
}, [filterCommands]);
|
|
60
|
-
|
|
61
|
-
const hideCompletion = useCallback(() => {
|
|
62
|
-
setState({
|
|
63
|
-
visible: false,
|
|
64
|
-
commands: [],
|
|
65
|
-
selectedIndex: 0,
|
|
66
|
-
prefix: '',
|
|
67
|
-
});
|
|
68
|
-
}, []);
|
|
69
|
-
|
|
70
|
-
const updateCompletion = useCallback((prefix: string) => {
|
|
71
|
-
const filtered = filterCommands(prefix);
|
|
72
|
-
if (filtered.length === 0) {
|
|
73
|
-
hideCompletion();
|
|
74
|
-
} else {
|
|
75
|
-
setState(prev => ({
|
|
76
|
-
...prev,
|
|
77
|
-
commands: filtered,
|
|
78
|
-
selectedIndex: 0,
|
|
79
|
-
prefix,
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
}, [filterCommands, hideCompletion]);
|
|
83
|
-
|
|
84
|
-
const navigateUp = useCallback(() => {
|
|
85
|
-
setState(prev => {
|
|
86
|
-
if (prev.commands.length === 0) return prev;
|
|
87
|
-
const newIndex = prev.selectedIndex <= 0
|
|
88
|
-
? prev.commands.length - 1
|
|
89
|
-
: prev.selectedIndex - 1;
|
|
90
|
-
return { ...prev, selectedIndex: newIndex };
|
|
91
|
-
});
|
|
92
|
-
}, []);
|
|
93
|
-
|
|
94
|
-
const navigateDown = useCallback(() => {
|
|
95
|
-
setState(prev => {
|
|
96
|
-
if (prev.commands.length === 0) return prev;
|
|
97
|
-
const newIndex = prev.selectedIndex >= prev.commands.length - 1
|
|
98
|
-
? 0
|
|
99
|
-
: prev.selectedIndex + 1;
|
|
100
|
-
return { ...prev, selectedIndex: newIndex };
|
|
101
|
-
});
|
|
102
|
-
}, []);
|
|
103
|
-
|
|
104
|
-
const selectCurrent = useCallback((): string | null => {
|
|
105
|
-
if (!state.visible || state.commands.length === 0) return null;
|
|
106
|
-
const selected = state.commands[state.selectedIndex];
|
|
107
|
-
hideCompletion();
|
|
108
|
-
if (selected?.name) {
|
|
109
|
-
trackCommandUsage(selected.name);
|
|
110
|
-
}
|
|
111
|
-
return selected?.name || null;
|
|
112
|
-
}, [state, hideCompletion]);
|
|
113
|
-
|
|
114
|
-
return {
|
|
115
|
-
state,
|
|
116
|
-
showCompletion,
|
|
117
|
-
hideCompletion,
|
|
118
|
-
updateCompletion,
|
|
119
|
-
navigateUp,
|
|
120
|
-
navigateDown,
|
|
121
|
-
selectCurrent,
|
|
122
|
-
isVisible: state.visible,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useTodos Hook
|
|
3
|
-
*
|
|
4
|
-
* React hook for subscribing to todo list data.
|
|
5
|
-
* Uses WebSocket /ws/todos for real-time updates (no polling).
|
|
6
|
-
* Story MSSCI-12717 - React Migration
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { useState, useEffect, useRef } from 'react';
|
|
10
|
-
|
|
11
|
-
export interface TodoItem {
|
|
12
|
-
id: string;
|
|
13
|
-
content: string;
|
|
14
|
-
activeForm: string;
|
|
15
|
-
status: 'pending' | 'in_progress' | 'completed';
|
|
16
|
-
blockedBy?: string[];
|
|
17
|
-
blocks?: string[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface UseTodosResult {
|
|
21
|
-
todos: TodoItem[];
|
|
22
|
-
isLoading: boolean;
|
|
23
|
-
error: Error | null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** WebSocket message format from /ws/todos */
|
|
27
|
-
interface TodosMessage {
|
|
28
|
-
type: 'init' | 'update';
|
|
29
|
-
todos: TodoItem[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function useTodos(): UseTodosResult {
|
|
33
|
-
const [todos, setTodos] = useState<TodoItem[]>([]);
|
|
34
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
-
const [error, setError] = useState<Error | null>(null);
|
|
36
|
-
const wsRef = useRef<WebSocket | null>(null);
|
|
37
|
-
const reconnectTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
|
38
|
-
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
41
|
-
const wsUrl = `${protocol}//${window.location.host}/ws/todos`;
|
|
42
|
-
|
|
43
|
-
const connect = () => {
|
|
44
|
-
try {
|
|
45
|
-
wsRef.current = new WebSocket(wsUrl);
|
|
46
|
-
|
|
47
|
-
wsRef.current.onopen = () => {
|
|
48
|
-
console.debug('[useTodos] WebSocket connected');
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
wsRef.current.onmessage = (event) => {
|
|
52
|
-
try {
|
|
53
|
-
const msg = JSON.parse(event.data) as TodosMessage;
|
|
54
|
-
if (msg.type === 'init' || msg.type === 'update') {
|
|
55
|
-
setTodos(msg.todos || []);
|
|
56
|
-
setIsLoading(false);
|
|
57
|
-
setError(null);
|
|
58
|
-
}
|
|
59
|
-
} catch (err) {
|
|
60
|
-
console.error('[useTodos] Failed to parse message:', err);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
wsRef.current.onclose = () => {
|
|
65
|
-
console.debug('[useTodos] WebSocket closed, reconnecting...');
|
|
66
|
-
reconnectTimeoutRef.current = setTimeout(connect, 2000);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
wsRef.current.onerror = (err) => {
|
|
70
|
-
console.error('[useTodos] WebSocket error:', err);
|
|
71
|
-
setError(new Error('WebSocket connection failed'));
|
|
72
|
-
};
|
|
73
|
-
} catch (err) {
|
|
74
|
-
console.error('[useTodos] WebSocket init failed:', err);
|
|
75
|
-
setError(err instanceof Error ? err : new Error('Failed to connect'));
|
|
76
|
-
setIsLoading(false);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
connect();
|
|
81
|
-
|
|
82
|
-
return () => {
|
|
83
|
-
if (reconnectTimeoutRef.current) {
|
|
84
|
-
clearTimeout(reconnectTimeoutRef.current);
|
|
85
|
-
}
|
|
86
|
-
if (wsRef.current) {
|
|
87
|
-
wsRef.current.close();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}, []);
|
|
91
|
-
|
|
92
|
-
return { todos, isLoading, error };
|
|
93
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useUserAvatar Hook
|
|
3
|
-
*
|
|
4
|
-
* React hook for fetching and managing user avatar state.
|
|
5
|
-
* Story MSSCI-12777 - User Avatar from GitHub/Gravatar
|
|
6
|
-
*
|
|
7
|
-
* Uses avatar-service for fetching with fallback chain:
|
|
8
|
-
* GitHub → Gravatar → Default silhouette
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { useState, useEffect } from 'react';
|
|
12
|
-
import { DEFAULT_AVATAR } from '../utils/avatar-service';
|
|
13
|
-
|
|
14
|
-
export { DEFAULT_AVATAR };
|
|
15
|
-
|
|
16
|
-
export interface UseUserAvatarResult {
|
|
17
|
-
avatarUrl: string | null;
|
|
18
|
-
isLoading: boolean;
|
|
19
|
-
error: Error | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function useUserAvatar(): UseUserAvatarResult {
|
|
23
|
-
const [avatarUrl, setAvatarUrl] = useState<string | null>(null);
|
|
24
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
25
|
-
const [error, setError] = useState<Error | null>(null);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
const fetchAvatar = async () => {
|
|
29
|
-
try {
|
|
30
|
-
// Try REST endpoint for avatar
|
|
31
|
-
const response = await fetch('/api/identity');
|
|
32
|
-
if (response.ok) {
|
|
33
|
-
const data = await response.json();
|
|
34
|
-
if (data.avatarUrl) {
|
|
35
|
-
setAvatarUrl(data.avatarUrl);
|
|
36
|
-
} else {
|
|
37
|
-
setAvatarUrl(DEFAULT_AVATAR);
|
|
38
|
-
}
|
|
39
|
-
} else {
|
|
40
|
-
setAvatarUrl(DEFAULT_AVATAR);
|
|
41
|
-
}
|
|
42
|
-
setIsLoading(false);
|
|
43
|
-
} catch (err) {
|
|
44
|
-
setError(err instanceof Error ? err : new Error('Failed to fetch avatar'));
|
|
45
|
-
setAvatarUrl(DEFAULT_AVATAR);
|
|
46
|
-
setIsLoading(false);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
fetchAvatar();
|
|
51
|
-
}, []);
|
|
52
|
-
|
|
53
|
-
return { avatarUrl, isLoading, error };
|
|
54
|
-
}
|
package/src/public/index.tsx
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRoot } from 'react-dom/client';
|
|
2
|
-
import App from './App';
|
|
3
|
-
import './styles/tailwind.css';
|
|
4
|
-
import './css/theme-system.css';
|
|
5
|
-
|
|
6
|
-
// React entry point for Cyclist
|
|
7
|
-
const container = document.getElementById('react-root');
|
|
8
|
-
if (container) {
|
|
9
|
-
createRoot(container).render(<App />);
|
|
10
|
-
}
|