context-mode 1.0.161 → 1.0.163
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 +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/README.md +142 -28
- package/bin/statusline.mjs +24 -4
- package/build/adapters/antigravity/index.d.ts +1 -1
- package/build/adapters/antigravity-cli/index.d.ts +51 -0
- package/build/adapters/antigravity-cli/index.js +341 -0
- package/build/adapters/claude-code/hooks.d.ts +1 -0
- package/build/adapters/claude-code/hooks.js +3 -0
- package/build/adapters/claude-code/index.js +24 -5
- package/build/adapters/client-map.js +5 -0
- package/build/adapters/codex/hooks.d.ts +5 -1
- package/build/adapters/codex/hooks.js +5 -1
- package/build/adapters/codex/index.d.ts +9 -1
- package/build/adapters/codex/index.js +87 -5
- package/build/adapters/copilot-cli/hooks.d.ts +33 -0
- package/build/adapters/copilot-cli/hooks.js +64 -0
- package/build/adapters/copilot-cli/index.d.ts +48 -0
- package/build/adapters/copilot-cli/index.js +341 -0
- package/build/adapters/detect.d.ts +1 -1
- package/build/adapters/detect.js +71 -3
- package/build/adapters/openclaw/mcp-tools.js +1 -1
- package/build/adapters/opencode/index.js +31 -17
- package/build/adapters/opencode/zod3tov4.js +27 -6
- package/build/adapters/pi/extension.d.ts +2 -12
- package/build/adapters/pi/extension.js +114 -96
- package/build/adapters/types.d.ts +5 -4
- package/build/adapters/types.js +4 -3
- package/build/cache-heal.d.ts +48 -0
- package/build/cache-heal.js +150 -0
- package/build/cli.js +37 -97
- package/build/executor.d.ts +25 -0
- package/build/executor.js +143 -22
- package/build/opencode-plugin.js +5 -2
- package/build/routing-block.d.ts +8 -0
- package/build/routing-block.js +86 -0
- package/build/runtime.d.ts +0 -36
- package/build/runtime.js +107 -27
- package/build/search/flood-guard.d.ts +57 -0
- package/build/search/flood-guard.js +80 -0
- package/build/security.d.ts +8 -3
- package/build/security.js +155 -29
- package/build/server.d.ts +14 -0
- package/build/server.js +368 -350
- package/build/session/analytics.d.ts +8 -8
- package/build/session/analytics.js +18 -13
- package/build/session/db.d.ts +1 -0
- package/build/session/db.js +37 -4
- package/build/session/extract.d.ts +46 -0
- package/build/session/extract.js +764 -13
- package/build/session/project-attribution.js +14 -0
- package/build/store.d.ts +1 -1
- package/build/store.js +139 -25
- package/build/tool-naming.d.ts +4 -0
- package/build/tool-naming.js +24 -0
- package/build/util/jsonc.d.ts +14 -0
- package/build/util/jsonc.js +104 -0
- package/cli.bundle.mjs +260 -254
- package/configs/antigravity/GEMINI.md +2 -2
- package/configs/antigravity-cli/hooks/hooks.json +37 -0
- package/configs/antigravity-cli/hooks.json +37 -0
- package/configs/antigravity-cli/mcp_config.json +10 -0
- package/configs/antigravity-cli/plugin.json +14 -0
- package/configs/antigravity-cli/rules/context-mode.md +77 -0
- package/configs/antigravity-cli/skills/context-mode/SKILL.md +77 -0
- package/configs/claude-code/CLAUDE.md +2 -2
- package/configs/codex/AGENTS.md +2 -2
- package/configs/copilot-cli/.github/plugin/plugin.json +23 -0
- package/configs/copilot-cli/.mcp.json +12 -0
- package/configs/copilot-cli/README.md +47 -0
- package/configs/copilot-cli/hooks.json +41 -0
- package/configs/copilot-cli/skills/context-mode/SKILL.md +38 -0
- package/configs/gemini-cli/GEMINI.md +2 -2
- package/configs/jetbrains-copilot/copilot-instructions.md +2 -2
- package/configs/kilo/AGENTS.md +2 -2
- package/configs/kiro/KIRO.md +2 -2
- package/configs/omp/SYSTEM.md +2 -2
- package/configs/openclaw/AGENTS.md +2 -2
- package/configs/opencode/AGENTS.md +2 -2
- package/configs/qwen-code/QWEN.md +2 -2
- package/configs/vscode-copilot/copilot-instructions.md +2 -2
- package/configs/zed/AGENTS.md +2 -2
- package/hooks/antigravity-cli/payload.mjs +98 -0
- package/hooks/antigravity-cli/posttooluse.mjs +138 -0
- package/hooks/antigravity-cli/pretooluse.mjs +78 -0
- package/hooks/antigravity-cli/stop.mjs +58 -0
- package/hooks/codex/pretooluse.mjs +14 -4
- package/hooks/codex/stop.mjs +12 -4
- package/hooks/copilot-cli/posttooluse.mjs +79 -0
- package/hooks/copilot-cli/precompact.mjs +66 -0
- package/hooks/copilot-cli/pretooluse.mjs +41 -0
- package/hooks/copilot-cli/sessionstart.mjs +121 -0
- package/hooks/copilot-cli/stop.mjs +59 -0
- package/hooks/copilot-cli/userpromptsubmit.mjs +77 -0
- package/hooks/core/codex-caps.mjs +112 -0
- package/hooks/core/formatters.mjs +158 -7
- package/hooks/core/mcp-ready.mjs +37 -8
- package/hooks/core/routing.mjs +94 -8
- package/hooks/core/tool-naming.mjs +3 -0
- package/hooks/hooks.json +12 -1
- package/hooks/pretooluse.mjs +6 -2
- package/hooks/routing-block.mjs +2 -2
- package/hooks/security.bundle.mjs +2 -1
- package/hooks/session-db.bundle.mjs +11 -7
- package/hooks/session-directive.mjs +88 -20
- package/hooks/session-extract.bundle.mjs +2 -2
- package/hooks/session-helpers.mjs +21 -0
- package/hooks/session-loaders.mjs +8 -5
- package/hooks/sessionstart.mjs +53 -7
- package/hooks/stop.mjs +49 -0
- package/hooks/userpromptsubmit.mjs +9 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +4 -10
- package/scripts/install-antigravity-cli-plugin.mjs +141 -0
- package/server.bundle.mjs +214 -205
- package/skills/ctx-insight/SKILL.md +12 -17
- package/build/util/db-lock.d.ts +0 -65
- package/build/util/db-lock.js +0 -166
- package/insight/index.html +0 -13
- package/insight/package.json +0 -55
- package/insight/server.mjs +0 -1265
- package/insight/src/components/analytics.tsx +0 -112
- package/insight/src/components/ui/badge.tsx +0 -52
- package/insight/src/components/ui/button.tsx +0 -58
- package/insight/src/components/ui/card.tsx +0 -103
- package/insight/src/components/ui/chart.tsx +0 -371
- package/insight/src/components/ui/collapsible.tsx +0 -19
- package/insight/src/components/ui/input.tsx +0 -20
- package/insight/src/components/ui/progress.tsx +0 -83
- package/insight/src/components/ui/scroll-area.tsx +0 -55
- package/insight/src/components/ui/separator.tsx +0 -23
- package/insight/src/components/ui/table.tsx +0 -114
- package/insight/src/components/ui/tabs.tsx +0 -82
- package/insight/src/components/ui/tooltip.tsx +0 -64
- package/insight/src/lib/api.ts +0 -144
- package/insight/src/lib/utils.ts +0 -6
- package/insight/src/main.tsx +0 -22
- package/insight/src/routeTree.gen.ts +0 -189
- package/insight/src/router.tsx +0 -19
- package/insight/src/routes/__root.tsx +0 -55
- package/insight/src/routes/enterprise.tsx +0 -316
- package/insight/src/routes/index.tsx +0 -1482
- package/insight/src/routes/knowledge.tsx +0 -221
- package/insight/src/routes/knowledge_.$dbHash.$sourceId.tsx +0 -137
- package/insight/src/routes/search.tsx +0 -97
- package/insight/src/routes/sessions.tsx +0 -179
- package/insight/src/routes/sessions_.$dbHash.$sessionId.tsx +0 -181
- package/insight/src/styles.css +0 -104
- package/insight/tsconfig.json +0 -29
- package/insight/vite.config.ts +0 -19
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible"
|
|
2
|
-
|
|
3
|
-
function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
|
|
4
|
-
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {
|
|
8
|
-
return (
|
|
9
|
-
<CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
|
|
10
|
-
)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {
|
|
14
|
-
return (
|
|
15
|
-
<CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Input as InputPrimitive } from "@base-ui/react/input"
|
|
3
|
-
|
|
4
|
-
import { cn } from "#/lib/utils"
|
|
5
|
-
|
|
6
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
7
|
-
return (
|
|
8
|
-
<InputPrimitive
|
|
9
|
-
type={type}
|
|
10
|
-
data-slot="input"
|
|
11
|
-
className={cn(
|
|
12
|
-
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Input }
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
4
|
-
|
|
5
|
-
import { cn } from "#/lib/utils"
|
|
6
|
-
|
|
7
|
-
function Progress({
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
value,
|
|
11
|
-
...props
|
|
12
|
-
}: ProgressPrimitive.Root.Props) {
|
|
13
|
-
return (
|
|
14
|
-
<ProgressPrimitive.Root
|
|
15
|
-
value={value}
|
|
16
|
-
data-slot="progress"
|
|
17
|
-
className={cn("flex flex-wrap gap-3", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
<ProgressTrack>
|
|
22
|
-
<ProgressIndicator />
|
|
23
|
-
</ProgressTrack>
|
|
24
|
-
</ProgressPrimitive.Root>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
29
|
-
return (
|
|
30
|
-
<ProgressPrimitive.Track
|
|
31
|
-
className={cn(
|
|
32
|
-
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
33
|
-
className
|
|
34
|
-
)}
|
|
35
|
-
data-slot="progress-track"
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function ProgressIndicator({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}: ProgressPrimitive.Indicator.Props) {
|
|
45
|
-
return (
|
|
46
|
-
<ProgressPrimitive.Indicator
|
|
47
|
-
data-slot="progress-indicator"
|
|
48
|
-
className={cn("h-full bg-primary transition-all", className)}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
55
|
-
return (
|
|
56
|
-
<ProgressPrimitive.Label
|
|
57
|
-
className={cn("text-sm font-medium", className)}
|
|
58
|
-
data-slot="progress-label"
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
65
|
-
return (
|
|
66
|
-
<ProgressPrimitive.Value
|
|
67
|
-
className={cn(
|
|
68
|
-
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
data-slot="progress-value"
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
Progress,
|
|
79
|
-
ProgressTrack,
|
|
80
|
-
ProgressIndicator,
|
|
81
|
-
ProgressLabel,
|
|
82
|
-
ProgressValue,
|
|
83
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
|
|
5
|
-
|
|
6
|
-
import { cn } from "#/lib/utils"
|
|
7
|
-
|
|
8
|
-
function ScrollArea({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: ScrollAreaPrimitive.Root.Props) {
|
|
13
|
-
return (
|
|
14
|
-
<ScrollAreaPrimitive.Root
|
|
15
|
-
data-slot="scroll-area"
|
|
16
|
-
className={cn("relative", className)}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
<ScrollAreaPrimitive.Viewport
|
|
20
|
-
data-slot="scroll-area-viewport"
|
|
21
|
-
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</ScrollAreaPrimitive.Viewport>
|
|
25
|
-
<ScrollBar />
|
|
26
|
-
<ScrollAreaPrimitive.Corner />
|
|
27
|
-
</ScrollAreaPrimitive.Root>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function ScrollBar({
|
|
32
|
-
className,
|
|
33
|
-
orientation = "vertical",
|
|
34
|
-
...props
|
|
35
|
-
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
36
|
-
return (
|
|
37
|
-
<ScrollAreaPrimitive.Scrollbar
|
|
38
|
-
data-slot="scroll-area-scrollbar"
|
|
39
|
-
data-orientation={orientation}
|
|
40
|
-
orientation={orientation}
|
|
41
|
-
className={cn(
|
|
42
|
-
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
<ScrollAreaPrimitive.Thumb
|
|
48
|
-
data-slot="scroll-area-thumb"
|
|
49
|
-
className="relative flex-1 rounded-full bg-border"
|
|
50
|
-
/>
|
|
51
|
-
</ScrollAreaPrimitive.Scrollbar>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { ScrollArea, ScrollBar }
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils"
|
|
4
|
-
|
|
5
|
-
function Separator({
|
|
6
|
-
className,
|
|
7
|
-
orientation = "horizontal",
|
|
8
|
-
...props
|
|
9
|
-
}: SeparatorPrimitive.Props) {
|
|
10
|
-
return (
|
|
11
|
-
<SeparatorPrimitive
|
|
12
|
-
data-slot="separator"
|
|
13
|
-
orientation={orientation}
|
|
14
|
-
className={cn(
|
|
15
|
-
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { Separator }
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils"
|
|
4
|
-
|
|
5
|
-
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="table-container"
|
|
9
|
-
className="relative w-full overflow-x-auto"
|
|
10
|
-
>
|
|
11
|
-
<table
|
|
12
|
-
data-slot="table"
|
|
13
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
21
|
-
return (
|
|
22
|
-
<thead
|
|
23
|
-
data-slot="table-header"
|
|
24
|
-
className={cn("[&_tr]:border-b", className)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
31
|
-
return (
|
|
32
|
-
<tbody
|
|
33
|
-
data-slot="table-body"
|
|
34
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
41
|
-
return (
|
|
42
|
-
<tfoot
|
|
43
|
-
data-slot="table-footer"
|
|
44
|
-
className={cn(
|
|
45
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
54
|
-
return (
|
|
55
|
-
<tr
|
|
56
|
-
data-slot="table-row"
|
|
57
|
-
className={cn(
|
|
58
|
-
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
59
|
-
className
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
67
|
-
return (
|
|
68
|
-
<th
|
|
69
|
-
data-slot="table-head"
|
|
70
|
-
className={cn(
|
|
71
|
-
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
72
|
-
className
|
|
73
|
-
)}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
80
|
-
return (
|
|
81
|
-
<td
|
|
82
|
-
data-slot="table-cell"
|
|
83
|
-
className={cn(
|
|
84
|
-
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
85
|
-
className
|
|
86
|
-
)}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function TableCaption({
|
|
93
|
-
className,
|
|
94
|
-
...props
|
|
95
|
-
}: React.ComponentProps<"caption">) {
|
|
96
|
-
return (
|
|
97
|
-
<caption
|
|
98
|
-
data-slot="table-caption"
|
|
99
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
Table,
|
|
107
|
-
TableHeader,
|
|
108
|
-
TableBody,
|
|
109
|
-
TableFooter,
|
|
110
|
-
TableHead,
|
|
111
|
-
TableRow,
|
|
112
|
-
TableCell,
|
|
113
|
-
TableCaption,
|
|
114
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
|
|
4
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
|
-
|
|
6
|
-
import { cn } from "#/lib/utils"
|
|
7
|
-
|
|
8
|
-
function Tabs({
|
|
9
|
-
className,
|
|
10
|
-
orientation = "horizontal",
|
|
11
|
-
...props
|
|
12
|
-
}: TabsPrimitive.Root.Props) {
|
|
13
|
-
return (
|
|
14
|
-
<TabsPrimitive.Root
|
|
15
|
-
data-slot="tabs"
|
|
16
|
-
data-orientation={orientation}
|
|
17
|
-
className={cn(
|
|
18
|
-
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const tabsListVariants = cva(
|
|
27
|
-
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
|
|
28
|
-
{
|
|
29
|
-
variants: {
|
|
30
|
-
variant: {
|
|
31
|
-
default: "bg-muted",
|
|
32
|
-
line: "gap-1 bg-transparent",
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
variant: "default",
|
|
37
|
-
},
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
function TabsList({
|
|
42
|
-
className,
|
|
43
|
-
variant = "default",
|
|
44
|
-
...props
|
|
45
|
-
}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {
|
|
46
|
-
return (
|
|
47
|
-
<TabsPrimitive.List
|
|
48
|
-
data-slot="tabs-list"
|
|
49
|
-
data-variant={variant}
|
|
50
|
-
className={cn(tabsListVariants({ variant }), className)}
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
|
|
57
|
-
return (
|
|
58
|
-
<TabsPrimitive.Tab
|
|
59
|
-
data-slot="tabs-trigger"
|
|
60
|
-
className={cn(
|
|
61
|
-
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
62
|
-
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
63
|
-
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
64
|
-
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
65
|
-
className
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
|
|
73
|
-
return (
|
|
74
|
-
<TabsPrimitive.Panel
|
|
75
|
-
data-slot="tabs-content"
|
|
76
|
-
className={cn("flex-1 text-sm outline-none", className)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"
|
|
2
|
-
|
|
3
|
-
import { cn } from "#/lib/utils"
|
|
4
|
-
|
|
5
|
-
function TooltipProvider({
|
|
6
|
-
delay = 0,
|
|
7
|
-
...props
|
|
8
|
-
}: TooltipPrimitive.Provider.Props) {
|
|
9
|
-
return (
|
|
10
|
-
<TooltipPrimitive.Provider
|
|
11
|
-
data-slot="tooltip-provider"
|
|
12
|
-
delay={delay}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function Tooltip({ ...props }: TooltipPrimitive.Root.Props) {
|
|
19
|
-
return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {
|
|
23
|
-
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function TooltipContent({
|
|
27
|
-
className,
|
|
28
|
-
side = "top",
|
|
29
|
-
sideOffset = 4,
|
|
30
|
-
align = "center",
|
|
31
|
-
alignOffset = 0,
|
|
32
|
-
children,
|
|
33
|
-
...props
|
|
34
|
-
}: TooltipPrimitive.Popup.Props &
|
|
35
|
-
Pick<
|
|
36
|
-
TooltipPrimitive.Positioner.Props,
|
|
37
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
38
|
-
>) {
|
|
39
|
-
return (
|
|
40
|
-
<TooltipPrimitive.Portal>
|
|
41
|
-
<TooltipPrimitive.Positioner
|
|
42
|
-
align={align}
|
|
43
|
-
alignOffset={alignOffset}
|
|
44
|
-
side={side}
|
|
45
|
-
sideOffset={sideOffset}
|
|
46
|
-
className="isolate z-50"
|
|
47
|
-
>
|
|
48
|
-
<TooltipPrimitive.Popup
|
|
49
|
-
data-slot="tooltip-content"
|
|
50
|
-
className={cn(
|
|
51
|
-
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
52
|
-
className
|
|
53
|
-
)}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
{children}
|
|
57
|
-
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
|
|
58
|
-
</TooltipPrimitive.Popup>
|
|
59
|
-
</TooltipPrimitive.Positioner>
|
|
60
|
-
</TooltipPrimitive.Portal>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
package/insight/src/lib/api.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
const API = "/api";
|
|
2
|
-
|
|
3
|
-
export interface OverviewData {
|
|
4
|
-
content: { databases: number; sources: number; chunks: number; totalSize: string; totalSizeBytes: number };
|
|
5
|
-
sessions: { databases: number; sessions: number; events: number; totalSize: string; totalSizeBytes: number };
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface Source { id: number; label: string; chunks: number; codeChunks: number; indexedAt: string; }
|
|
9
|
-
export interface ContentDB { hash: string; size: string; sizeBytes: number; sourceCount: number; chunkCount: number; sources: Source[]; }
|
|
10
|
-
export interface Chunk { title: string; content: string; content_type: string; label: string; highlighted?: string; dbHash?: string; rank?: number; }
|
|
11
|
-
export interface SessionMeta { id: string; projectDir: string; startedAt: string; lastEventAt: string; eventCount: number; compactCount: number; }
|
|
12
|
-
export interface SessionDB { hash: string; size: string; sizeBytes: number; sessions: SessionMeta[]; }
|
|
13
|
-
export interface SessionEvent { id: number; type: string; category: string; priority: number; data: string; source_hook: string; created_at: string; }
|
|
14
|
-
export interface SessionEventData { events: SessionEvent[]; resume: { snapshot: string; event_count: number; consumed: number } | null; }
|
|
15
|
-
|
|
16
|
-
export interface AnalyticsData {
|
|
17
|
-
totals: {
|
|
18
|
-
totalSessions: number; totalEvents: number; avgSessionMin: number;
|
|
19
|
-
totalErrors: number; errorRate: number; totalCompacts: number;
|
|
20
|
-
compactRate: number; reads: number; writes: number;
|
|
21
|
-
readWriteRatio: number; totalFileOps: number;
|
|
22
|
-
totalSubagents: number; totalTasks: number;
|
|
23
|
-
totalPrompts: number; promptsPerSession: number;
|
|
24
|
-
uniqueProjects: number;
|
|
25
|
-
totalCommits: number; commitsPerSession: number; sandboxRate: number;
|
|
26
|
-
totalRules: number; totalEditTestCycles: number;
|
|
27
|
-
};
|
|
28
|
-
sessionsByDate: { date: string; count: number; events: number; compacts: number }[];
|
|
29
|
-
sessionDurations: { session_id: string; project_dir: string; started_at: string; last_event_at: string; duration_min: number; event_count: number; compact_count: number }[];
|
|
30
|
-
toolUsage: { tool: string; count: number }[];
|
|
31
|
-
mcpTools: { tool: string; count: number }[];
|
|
32
|
-
errors: { detail: string; created_at: string; session_id: string }[];
|
|
33
|
-
fileActivity: { file: string; op: string; count: number }[];
|
|
34
|
-
workModes: { mode: string; count: number }[];
|
|
35
|
-
timeToFirstCommit: { session_id: string; started_at: string; first_commit_at: string; minutes_to_commit: number }[];
|
|
36
|
-
exploreExecRatio: { explore: number; execute: number; total: number };
|
|
37
|
-
reworkData: { session_id: string; file: string; edit_count: number }[];
|
|
38
|
-
gitActivity: { action: string; created_at: string; session_id: string; project_dir: string; session_start: string }[];
|
|
39
|
-
subagents: {
|
|
40
|
-
total: number; bursts: number; maxConcurrent: number;
|
|
41
|
-
parallelCount: number; sequentialCount: number; timeSavedMin: number;
|
|
42
|
-
burstDetails: { size: number; time: string }[];
|
|
43
|
-
};
|
|
44
|
-
projectActivity: { project_dir: string; sessions: number; events: number; compacts: number; avg_confidence?: number; high_conf_events?: number }[];
|
|
45
|
-
attribution?: { totalEvents: number; attributedEvents: number; unknownEvents: number; unknownPct: number; avgConfidencePct: number; highConfidencePct: number; isFallbackOnly: boolean };
|
|
46
|
-
hourlyPattern: { hour: number; count: number }[];
|
|
47
|
-
weeklyTrend: { week: string; sessions: number; events: number }[];
|
|
48
|
-
tasks: { task: string; created_at: string }[];
|
|
49
|
-
prompts: { prompt: string; created_at: string; session_id: string }[];
|
|
50
|
-
masteryTrend: { week: string; errors: number; total: number; error_rate: number }[];
|
|
51
|
-
commitRate: { session_id: string; project_dir: string; commits: number }[];
|
|
52
|
-
sandboxAdoption: { sandbox_calls: number; total_calls: number };
|
|
53
|
-
rulesFreshness: { rule_path: string; last_seen: string; load_count: number }[];
|
|
54
|
-
editTestCycles: { session_id: string; cycles: number }[];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface CategoryCount {
|
|
58
|
-
category: string;
|
|
59
|
-
count: number;
|
|
60
|
-
types: Record<string, number>;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface CategoryAnalyticsData {
|
|
64
|
-
categories: CategoryCount[];
|
|
65
|
-
errorIntelligence: {
|
|
66
|
-
totalErrors: number;
|
|
67
|
-
resolvedErrors: number;
|
|
68
|
-
resolutionRate: number;
|
|
69
|
-
retryStorms: number;
|
|
70
|
-
avgLatencyMs: number;
|
|
71
|
-
p95LatencyMs: number;
|
|
72
|
-
p95SampleCount: number;
|
|
73
|
-
slowestTool: string | null;
|
|
74
|
-
topErrorTools: { tool: string; count: number }[];
|
|
75
|
-
latencyByTool: { tool: string; avg_ms: number; count: number; max_ms: number }[];
|
|
76
|
-
};
|
|
77
|
-
delegation: {
|
|
78
|
-
launched: number;
|
|
79
|
-
completed: number;
|
|
80
|
-
completionRate: number;
|
|
81
|
-
parallelBursts: number;
|
|
82
|
-
maxConcurrent: number;
|
|
83
|
-
timeSavedMin: number;
|
|
84
|
-
};
|
|
85
|
-
governance: {
|
|
86
|
-
totalRejections: number;
|
|
87
|
-
totalDecisions: number;
|
|
88
|
-
totalConstraints: number;
|
|
89
|
-
planApproved: number;
|
|
90
|
-
planRejected: number;
|
|
91
|
-
planApprovalRate: number;
|
|
92
|
-
topRejected: { tool: string; count: number }[];
|
|
93
|
-
};
|
|
94
|
-
gitProductivity: {
|
|
95
|
-
totalCommits: number;
|
|
96
|
-
totalPushes: number;
|
|
97
|
-
commitPushRatio: number;
|
|
98
|
-
totalOperations: number;
|
|
99
|
-
operationMix: { operation: string; count: number }[];
|
|
100
|
-
};
|
|
101
|
-
contextHealth: {
|
|
102
|
-
uniqueRuleFiles: number;
|
|
103
|
-
ruleLoadsPerSession: number;
|
|
104
|
-
uniqueSkills: number;
|
|
105
|
-
skillList: string[];
|
|
106
|
-
modeDistribution: { mode: string; count: number; pct: number }[];
|
|
107
|
-
compactRate: number;
|
|
108
|
-
totalBlockers: number;
|
|
109
|
-
resolvedBlockers: number;
|
|
110
|
-
blockerResolutionRate: number;
|
|
111
|
-
};
|
|
112
|
-
fileIntelligence: {
|
|
113
|
-
readWriteRatio: number;
|
|
114
|
-
explorationDepth: number;
|
|
115
|
-
hotFiles: { file: string; touches: number }[];
|
|
116
|
-
fileChurnRate: number;
|
|
117
|
-
};
|
|
118
|
-
compositeScores: {
|
|
119
|
-
productivity: number;
|
|
120
|
-
quality: number;
|
|
121
|
-
delegation: number;
|
|
122
|
-
contextHealth: number;
|
|
123
|
-
};
|
|
124
|
-
insufficientData: boolean;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
async function get<T>(path: string): Promise<T> {
|
|
128
|
-
const r = await fetch(`${API}${path}`);
|
|
129
|
-
return r.json() as Promise<T>;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export const api = {
|
|
133
|
-
overview: () => get<OverviewData>("/overview"),
|
|
134
|
-
analytics: () => get<AnalyticsData>("/analytics"),
|
|
135
|
-
categoryAnalytics: () => get<CategoryAnalyticsData>("/category-analytics"),
|
|
136
|
-
content: () => get<ContentDB[]>("/content"),
|
|
137
|
-
chunks: (dbHash: string, sourceId: number) => get<Chunk[]>(`/content/${dbHash}/chunks/${sourceId}`),
|
|
138
|
-
search: (q: string) => get<Chunk[]>(`/search?q=${encodeURIComponent(q)}`),
|
|
139
|
-
sessions: () => get<SessionDB[]>("/sessions"),
|
|
140
|
-
events: (dbHash: string, sessionId: string) =>
|
|
141
|
-
get<SessionEventData>(`/sessions/${dbHash}/events/${encodeURIComponent(sessionId)}`),
|
|
142
|
-
deleteSource: (dbHash: string, sourceId: number) =>
|
|
143
|
-
fetch(`${API}/content/${dbHash}/source/${sourceId}`, { method: "DELETE" }).then(r => r.json() as Promise<{ ok: boolean }>),
|
|
144
|
-
};
|
package/insight/src/lib/utils.ts
DELETED
package/insight/src/main.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import ReactDOM from 'react-dom/client'
|
|
2
|
-
import { RouterProvider, createRouter } from '@tanstack/react-router'
|
|
3
|
-
import { routeTree } from './routeTree.gen'
|
|
4
|
-
|
|
5
|
-
const router = createRouter({
|
|
6
|
-
routeTree,
|
|
7
|
-
defaultPreload: 'intent',
|
|
8
|
-
scrollRestoration: true,
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
declare module '@tanstack/react-router' {
|
|
12
|
-
interface Register {
|
|
13
|
-
router: typeof router
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const rootElement = document.getElementById('app')!
|
|
18
|
-
|
|
19
|
-
if (!rootElement.innerHTML) {
|
|
20
|
-
const root = ReactDOM.createRoot(rootElement)
|
|
21
|
-
root.render(<RouterProvider router={router} />)
|
|
22
|
-
}
|