shine-code-submit 0.2.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/.claude-plugin/marketplace.json +13 -0
- package/.claude-plugin/plugin.json +10 -0
- package/LICENSE +21 -0
- package/README.md +217 -0
- package/bin/launcher.cjs +35 -0
- package/bun.lock +45 -0
- package/dist/install.cjs +8 -0
- package/hooks/hooks.json +81 -0
- package/package.json +68 -0
- package/src/cli/main.ts +128 -0
- package/src/daemon/auth.ts +7 -0
- package/src/daemon/bus.ts +25 -0
- package/src/daemon/git.ts +118 -0
- package/src/daemon/logger.ts +66 -0
- package/src/daemon/main.ts +95 -0
- package/src/daemon/server.ts +208 -0
- package/src/daemon/spool-consumer.ts +52 -0
- package/src/daemon/stats.ts +33 -0
- package/src/daemon/store.ts +147 -0
- package/src/daemon/token-cache.ts +35 -0
- package/src/daemon/transcript.ts +130 -0
- package/src/daemon/ui-assets.ts +4 -0
- package/src/daemon/ui.ts +34 -0
- package/src/daemon/ws.ts +54 -0
- package/src/hook/main.ts +154 -0
- package/src/install/bun.ts +97 -0
- package/src/install/deploy.ts +78 -0
- package/src/install/json-safe.ts +43 -0
- package/src/install/main.ts +167 -0
- package/src/install/paths.ts +28 -0
- package/src/install/register.ts +108 -0
- package/src/shared/config.ts +77 -0
- package/src/shared/daemonctl.ts +110 -0
- package/src/shared/id.ts +19 -0
- package/src/shared/paths.ts +23 -0
- package/src/shared/pidfile.ts +32 -0
- package/src/shared/spool.ts +60 -0
- package/src/shared/types.ts +116 -0
- package/ui/.build/app.js +76 -0
- package/ui/app.tsx +31 -0
- package/ui/components/App.tsx +55 -0
- package/ui/components/CommitsModule.tsx +25 -0
- package/ui/components/CommitsView.tsx +84 -0
- package/ui/components/Conversation.tsx +101 -0
- package/ui/components/DiffBlock.tsx +64 -0
- package/ui/components/EventDetail.tsx +8 -0
- package/ui/components/EventItem.tsx +24 -0
- package/ui/components/EventList.tsx +22 -0
- package/ui/components/EventsModule.tsx +123 -0
- package/ui/components/Header.tsx +15 -0
- package/ui/components/Icon.tsx +114 -0
- package/ui/components/Markdown.tsx +13 -0
- package/ui/components/Message.tsx +60 -0
- package/ui/components/OverviewModule.tsx +86 -0
- package/ui/components/SessionDetail.tsx +51 -0
- package/ui/components/SessionTree.tsx +94 -0
- package/ui/components/SessionsModule.tsx +39 -0
- package/ui/components/SessionsPanel.tsx +15 -0
- package/ui/components/SideNav.tsx +46 -0
- package/ui/components/Splitter.tsx +23 -0
- package/ui/components/StatsModule.tsx +133 -0
- package/ui/components/Status.tsx +66 -0
- package/ui/components/SummaryView.tsx +83 -0
- package/ui/components/SystemModule.tsx +38 -0
- package/ui/components/ToolCard.tsx +57 -0
- package/ui/hooks/useAllCommits.ts +59 -0
- package/ui/hooks/useApi.ts +13 -0
- package/ui/hooks/useCommits.ts +45 -0
- package/ui/hooks/useConversation.ts +43 -0
- package/ui/hooks/useEvents.ts +45 -0
- package/ui/hooks/useSplitter.ts +43 -0
- package/ui/hooks/useStatsPolling.ts +35 -0
- package/ui/hooks/useWebSocket.ts +38 -0
- package/ui/index.html +13 -0
- package/ui/lib/aggregate.ts +81 -0
- package/ui/lib/diff.ts +45 -0
- package/ui/lib/export.ts +45 -0
- package/ui/lib/format.ts +100 -0
- package/ui/lib/util.ts +106 -0
- package/ui/state/AppContext.tsx +65 -0
- package/ui/style.css +849 -0
- package/ui/types.ts +46 -0
package/ui/types.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// 前端专用类型。后端契约类型从 src/shared/types 复用(type-only,bun build 打包时擦除,运行时 0 体积)。
|
|
2
|
+
import type {
|
|
3
|
+
CommitFile,
|
|
4
|
+
CommitLog,
|
|
5
|
+
CommitsResponse,
|
|
6
|
+
EventsResponse,
|
|
7
|
+
HookEvent,
|
|
8
|
+
SessionSummary,
|
|
9
|
+
StatsResponse,
|
|
10
|
+
TokenUsage,
|
|
11
|
+
TranscriptMessage,
|
|
12
|
+
} from "../src/shared/types";
|
|
13
|
+
|
|
14
|
+
// 便于组件统一从 ui/types 引。
|
|
15
|
+
export type {
|
|
16
|
+
CommitFile,
|
|
17
|
+
CommitLog,
|
|
18
|
+
CommitsResponse,
|
|
19
|
+
EventsResponse,
|
|
20
|
+
HookEvent,
|
|
21
|
+
SessionSummary,
|
|
22
|
+
StatsResponse,
|
|
23
|
+
TokenUsage,
|
|
24
|
+
TranscriptMessage,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** WS /api/ws 推送的消息。 */
|
|
28
|
+
export type WsMessage =
|
|
29
|
+
| { kind: "snapshot"; stats: StatsResponse }
|
|
30
|
+
| { kind: "event"; event: HookEvent };
|
|
31
|
+
|
|
32
|
+
/** GET /api/transcript 响应。tokenTotal 为该会话 assistant 消息累计用量。 */
|
|
33
|
+
export interface TranscriptResponse {
|
|
34
|
+
transcriptPath: string;
|
|
35
|
+
messages: TranscriptMessage[];
|
|
36
|
+
tokenTotal?: TokenUsage;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** HookEvent.payload 是 unknown,取字段时统一断言为这个字典视图。 */
|
|
40
|
+
export type Payload = Record<string, unknown>;
|
|
41
|
+
|
|
42
|
+
/** 主区视图模式。 */
|
|
43
|
+
export type ViewMode = "events" | "conversation" | "commits" | "summary";
|
|
44
|
+
|
|
45
|
+
/** 左侧导航模块(渐进重构:Step 1 起与 viewMode 并存,selectModule 经映射驱动 viewMode)。 */
|
|
46
|
+
export type ModuleId = "overview" | "sessions" | "events" | "commits" | "stats" | "system";
|