@witty-ai/skill-insight 0.5.0-beta → 0.6.0-beta
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/.env.example +5 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +4 -0
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +24 -0
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js +3 -3
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/route.js +3 -3
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +3 -3
- package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +4 -4
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/rejudge/route.js +3 -3
- package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js +6 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js +6 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js +3 -2
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/automation/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/logs/route.js +2 -2
- package/.next/standalone/.next/server/app/api/skills/logs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/route.js +3 -2
- package/.next/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js +8 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/task-stats/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/task-stats/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/task-stats/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js +11 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/task-stats/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/upload/route.js +1 -1
- package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/details/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/details/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/details.html +1 -1
- package/.next/standalone/.next/server/app/details.rsc +2 -2
- package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/details.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/details.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/details.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/details.segments/details/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/details.segments/details.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/skills.html +1 -1
- package/.next/standalone/.next/server/app/skills.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__15dbd1f2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8402dfd1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__863cf6de._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89404730._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa5c8858._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c20da96a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddf63a21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f9e66e02._.js +3 -0
- package/.next/standalone/.next/server/chunks/_3e8b4d8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/_41a98bd8._.js +1 -1
- package/.next/standalone/.next/server/chunks/_4c806e26._.js +3 -0
- package/.next/standalone/.next/server/chunks/_cd3d20ca._.js +1 -1
- package/.next/standalone/.next/server/chunks/_ddffef3e._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_setup_opencode-tui_route_actions_fc8ae29f.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_skills_sync-enterprise_route_actions_0ca45899.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_task-stats_route_actions_983505cd.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_setup_opencode-commands_si-optimizer_route_actions_fcde30ef.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c33286ed.js +47 -4
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f42faeee.js +1 -1
- package/.next/standalone/.next/server/chunks/src_98433cb8._.js +175 -0
- package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +2 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_3582f3d0.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_a1341fea._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_e1de6ed8._.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
- package/.next/standalone/.next/static/chunks/94dfb15df65ef720.js +2 -0
- package/.next/standalone/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
- package/.next/standalone/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
- package/.next/standalone/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
- package/.next/standalone/node_modules/.prisma/client/edge.js +6 -3
- package/.next/standalone/node_modules/.prisma/client/index-browser.js +3 -0
- package/.next/standalone/node_modules/.prisma/client/index.js +6 -3
- package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
- package/.next/standalone/node_modules/.prisma/client/schema.prisma +12 -9
- package/.next/standalone/node_modules/.prisma/client/wasm.js +3 -0
- package/.next/standalone/node_modules/adm-zip/util/constants.js +142 -0
- package/.next/standalone/node_modules/adm-zip/util/decoder.js +5 -0
- package/.next/standalone/node_modules/adm-zip/util/errors.js +63 -0
- package/.next/standalone/node_modules/adm-zip/util/fattr.js +76 -0
- package/.next/standalone/node_modules/adm-zip/util/index.js +5 -0
- package/.next/standalone/node_modules/adm-zip/util/utils.js +339 -0
- package/.next/standalone/package.json +6 -2
- package/.next/standalone/prisma/schema.prisma +3 -0
- package/.next/standalone/scripts/opencode_plugin.ts +23 -5
- package/.next/standalone/scripts/opencode_tui_plugin.tsx +308 -0
- package/.next/standalone/scripts/si-optimizer.md +5 -0
- package/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
- package/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
- package/.next/static/chunks/94dfb15df65ef720.js +2 -0
- package/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
- package/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
- package/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
- package/package.json +6 -2
- package/prisma/schema.prisma +3 -0
- package/scripts/activate_telemetry.sh +44 -1
- package/scripts/opencode_plugin.ts +23 -5
- package/scripts/opencode_tui_plugin.tsx +308 -0
- package/scripts/si-optimizer.md +5 -0
- package/scripts/utils.js +0 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2f0baee._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +0 -175
- package/.next/standalone/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
- package/.next/standalone/.next/static/chunks/a87b5e84254095a5.js +0 -1
- package/.next/standalone/LICENSE +0 -21
- package/.next/standalone/bin/cli.js +0 -106
- package/.next/standalone/custom-models.example.json +0 -21
- package/.next/standalone/eslint.config.mjs +0 -18
- package/.next/standalone/features/feature-skill-used-jump-link/design/2026-03-18-skill-used-jump-link-design.md +0 -126
- package/.next/standalone/features/feature-skill-used-jump-link/feature.json +0 -32
- package/.next/standalone/features/feature-skill-used-jump-link/issue.md +0 -32
- package/.next/standalone/features/feature-skill-used-jump-link/plans/2026-03-18-skill-used-jump-link.md +0 -528
- package/.next/standalone/next.config.ts +0 -41
- package/.next/standalone/scripts/activate_telemetry.sh +0 -159
- package/.next/standalone/scripts/create_migration_package.sh +0 -124
- package/.next/standalone/scripts/fix_models.js +0 -66
- package/.next/standalone/scripts/init_opengauss.py +0 -284
- package/.next/standalone/scripts/install.js +0 -273
- package/.next/standalone/scripts/logs.js +0 -38
- package/.next/standalone/scripts/otel_data/logs.jsonl +0 -12
- package/.next/standalone/scripts/otel_data/metrics.jsonl +0 -21
- package/.next/standalone/scripts/otel_data/raw_requests.jsonl +0 -8
- package/.next/standalone/scripts/otel_data/raw_requests.jsonl.bak +0 -6
- package/.next/standalone/scripts/otel_receiver.py +0 -580
- package/.next/standalone/scripts/postinstall.js +0 -192
- package/.next/standalone/scripts/publish-npm.js +0 -401
- package/.next/standalone/scripts/restart.js +0 -26
- package/.next/standalone/scripts/restart.sh +0 -138
- package/.next/standalone/scripts/restart_dev.sh +0 -132
- package/.next/standalone/scripts/start.js +0 -291
- package/.next/standalone/scripts/status.js +0 -41
- package/.next/standalone/scripts/stop.js +0 -90
- package/.next/standalone/scripts/sync_skills.js +0 -216
- package/.next/standalone/scripts/utils.js +0 -235
- package/.next/standalone/tests/setup_skill_optimizer.sh +0 -118
- package/.next/standalone/tsconfig.json +0 -34
- package/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
- package/.next/static/chunks/a87b5e84254095a5.js +0 -1
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
- /package/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
- /package/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{H581Rok68JtPV4bAVVH3l → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
# Skill Used Jump Link Implementation Plan
|
|
2
|
-
|
|
3
|
-
> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
-
|
|
5
|
-
**Goal:** Add click-to-navigate functionality from skill names in execution records to a dedicated skill detail page.
|
|
6
|
-
|
|
7
|
-
**Architecture:** Create SkillLink component for styled clickable skill names, skill detail page that can accept either skill ID or name, and modify execution record displays to use SkillLink component.
|
|
8
|
-
|
|
9
|
-
**Tech Stack:** Next.js 16, React 19, TypeScript, Prisma
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## File Structure
|
|
14
|
-
|
|
15
|
-
| File | Action | Purpose |
|
|
16
|
-
|------|--------|---------|
|
|
17
|
-
| `src/components/SkillLink.tsx` | Create | Clickable skill name component |
|
|
18
|
-
| `src/app/skills/page.tsx` | Create | Skill detail page (handles ID or name lookup) |
|
|
19
|
-
| `src/app/api/skills/by-name/route.ts` | Create | API to find skill by exact name |
|
|
20
|
-
| `src/app/details/page.tsx:1995-1998` | Modify | Replace skill text with SkillLink |
|
|
21
|
-
| `src/components/Dashboard.tsx:2559-2561` | Modify | Replace skill text with SkillLink |
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Chunk 1: API for Skill Lookup by Name
|
|
26
|
-
|
|
27
|
-
### Task 1.1: Create API to find skill by name
|
|
28
|
-
|
|
29
|
-
**Files:**
|
|
30
|
-
- Create: `src/app/api/skills/by-name/route.ts`
|
|
31
|
-
|
|
32
|
-
- [ ] **Step 1: Write the API endpoint**
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { resolveUser } from '@/lib/auth';
|
|
36
|
-
import { db } from '@/lib/prisma';
|
|
37
|
-
import { NextRequest, NextResponse } from 'next/server';
|
|
38
|
-
|
|
39
|
-
export const dynamic = 'force-dynamic';
|
|
40
|
-
|
|
41
|
-
export async function GET(request: NextRequest) {
|
|
42
|
-
try {
|
|
43
|
-
const searchParams = request.nextUrl.searchParams;
|
|
44
|
-
const name = searchParams.get('name');
|
|
45
|
-
const userParam = searchParams.get('user');
|
|
46
|
-
|
|
47
|
-
if (!name) {
|
|
48
|
-
return NextResponse.json({ error: 'Name parameter required' }, { status: 400 });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const { username: user } = await resolveUser(request, userParam);
|
|
52
|
-
|
|
53
|
-
const where: any = {
|
|
54
|
-
name: name
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
if (user) {
|
|
58
|
-
where.OR = [
|
|
59
|
-
{ user: user },
|
|
60
|
-
{ user: null },
|
|
61
|
-
{ visibility: 'public' }
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const skills = await db.findSkills(where);
|
|
66
|
-
const skill = skills[0];
|
|
67
|
-
|
|
68
|
-
if (!skill) {
|
|
69
|
-
return NextResponse.json({ error: 'Skill not found' }, { status: 404 });
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return NextResponse.json({
|
|
73
|
-
id: skill.id,
|
|
74
|
-
name: skill.name,
|
|
75
|
-
description: skill.description,
|
|
76
|
-
category: skill.category,
|
|
77
|
-
activeVersion: skill.activeVersion || 0
|
|
78
|
-
});
|
|
79
|
-
} catch (error) {
|
|
80
|
-
console.error('Find Skill By Name Error:', error);
|
|
81
|
-
return NextResponse.json({ error: 'Failed to find skill' }, { status: 500 });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
- [ ] **Step 2: Test the API manually**
|
|
87
|
-
|
|
88
|
-
Run: `curl "http://localhost:3000/api/skills/by-name?name=<existing_skill_name>"`
|
|
89
|
-
Expected: Returns skill JSON with id, name, description
|
|
90
|
-
Expected: Returns 404 for non-existent skill
|
|
91
|
-
|
|
92
|
-
- [ ] **Step 3: Commit**
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
git add src/app/api/skills/by-name/route.ts
|
|
96
|
-
git commit -m "feat: add API to find skill by exact name"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Chunk 2: SkillLink Component
|
|
102
|
-
|
|
103
|
-
### Task 2.1: Create SkillLink component
|
|
104
|
-
|
|
105
|
-
**Files:**
|
|
106
|
-
- Create: `src/components/SkillLink.tsx`
|
|
107
|
-
|
|
108
|
-
- [ ] **Step 1: Write the SkillLink component**
|
|
109
|
-
|
|
110
|
-
```typescript
|
|
111
|
-
'use client';
|
|
112
|
-
|
|
113
|
-
import { useRouter } from 'next/navigation';
|
|
114
|
-
import React from 'react';
|
|
115
|
-
|
|
116
|
-
interface SkillLinkProps {
|
|
117
|
-
skillId?: string | null;
|
|
118
|
-
skillName: string;
|
|
119
|
-
version?: string | number | null;
|
|
120
|
-
user?: string | null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export function SkillLink({ skillId, skillName, version, user }: SkillLinkProps) {
|
|
124
|
-
const router = useRouter();
|
|
125
|
-
|
|
126
|
-
const handleClick = (e: React.MouseEvent) => {
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
|
|
129
|
-
const params = new URLSearchParams();
|
|
130
|
-
if (skillId) {
|
|
131
|
-
params.set('id', skillId);
|
|
132
|
-
} else {
|
|
133
|
-
params.set('name', skillName);
|
|
134
|
-
if (user) params.set('user', user);
|
|
135
|
-
}
|
|
136
|
-
if (version !== null && version !== undefined) {
|
|
137
|
-
params.set('version', String(version));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
router.push(`/skills?${params.toString()}`);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
if (!skillId && !skillName) {
|
|
144
|
-
return <span style={{ color: '#64748b' }}>(None)</span>;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return (
|
|
148
|
-
<span
|
|
149
|
-
onClick={handleClick}
|
|
150
|
-
style={{
|
|
151
|
-
color: '#60a5fa',
|
|
152
|
-
cursor: 'pointer',
|
|
153
|
-
textDecoration: 'none',
|
|
154
|
-
transition: 'color 0.2s',
|
|
155
|
-
}}
|
|
156
|
-
onMouseEnter={(e) => {
|
|
157
|
-
e.currentTarget.style.textDecoration = 'underline';
|
|
158
|
-
e.currentTarget.style.color = '#93c5fd';
|
|
159
|
-
}}
|
|
160
|
-
onMouseLeave={(e) => {
|
|
161
|
-
e.currentTarget.style.textDecoration = 'none';
|
|
162
|
-
e.currentTarget.style.color = '#60a5fa';
|
|
163
|
-
}}
|
|
164
|
-
>
|
|
165
|
-
{skillName}{version ? ` (v${version})` : ''}
|
|
166
|
-
</span>
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
interface SkillLinksProps {
|
|
171
|
-
skills?: string[];
|
|
172
|
-
skill?: string;
|
|
173
|
-
skillId?: string | null;
|
|
174
|
-
skillIds?: string[];
|
|
175
|
-
skillVersion?: number | null;
|
|
176
|
-
user?: string | null;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export function SkillLinks({
|
|
180
|
-
skills,
|
|
181
|
-
skill,
|
|
182
|
-
skillId,
|
|
183
|
-
skillIds,
|
|
184
|
-
skillVersion,
|
|
185
|
-
user
|
|
186
|
-
}: SkillLinksProps) {
|
|
187
|
-
if (!skills?.length && !skill) {
|
|
188
|
-
return <span style={{ color: '#64748b' }}>(None)</span>;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (skills?.length) {
|
|
192
|
-
return (
|
|
193
|
-
<>
|
|
194
|
-
{skills.map((s, index) => {
|
|
195
|
-
const sId = skillIds?.[index] || null;
|
|
196
|
-
return (
|
|
197
|
-
<React.Fragment key={index}>
|
|
198
|
-
{index > 0 && <span style={{ color: '#e2e8f0' }}>, </span>}
|
|
199
|
-
<SkillLink
|
|
200
|
-
skillId={sId}
|
|
201
|
-
skillName={s}
|
|
202
|
-
version={skillVersion}
|
|
203
|
-
user={user}
|
|
204
|
-
/>
|
|
205
|
-
</React.Fragment>
|
|
206
|
-
);
|
|
207
|
-
})}
|
|
208
|
-
</>
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return (
|
|
213
|
-
<SkillLink
|
|
214
|
-
skillId={skillId}
|
|
215
|
-
skillName={skill!}
|
|
216
|
-
version={skillVersion}
|
|
217
|
-
user={user}
|
|
218
|
-
/>
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
- [ ] **Step 2: Commit**
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
git add src/components/SkillLink.tsx
|
|
227
|
-
git commit -m "feat: add SkillLink component for clickable skill names"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Chunk 3: Skill Detail Page
|
|
233
|
-
|
|
234
|
-
### Task 3.1: Create skill detail page
|
|
235
|
-
|
|
236
|
-
**Files:**
|
|
237
|
-
- Create: `src/app/skills/page.tsx`
|
|
238
|
-
|
|
239
|
-
- [ ] **Step 1: Write the skill detail page**
|
|
240
|
-
|
|
241
|
-
```typescript
|
|
242
|
-
'use client';
|
|
243
|
-
|
|
244
|
-
import { useSearchParams } from 'next/navigation';
|
|
245
|
-
import { useEffect, useState } from 'react';
|
|
246
|
-
import Link from 'next/link';
|
|
247
|
-
|
|
248
|
-
interface SkillData {
|
|
249
|
-
id: string;
|
|
250
|
-
name: string;
|
|
251
|
-
description?: string;
|
|
252
|
-
category?: string;
|
|
253
|
-
activeVersion: number;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
interface SkillVersionData {
|
|
257
|
-
version: number;
|
|
258
|
-
content: string;
|
|
259
|
-
changeLog?: string;
|
|
260
|
-
createdAt: string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export default function SkillDetailPage() {
|
|
264
|
-
const searchParams = useSearchParams();
|
|
265
|
-
const skillId = searchParams.get('id');
|
|
266
|
-
const skillName = searchParams.get('name');
|
|
267
|
-
const user = searchParams.get('user') || undefined;
|
|
268
|
-
const version = searchParams.get('version');
|
|
269
|
-
|
|
270
|
-
const [skill, setSkill] = useState<SkillData | null>(null);
|
|
271
|
-
const [skillVersion, setSkillVersion] = useState<SkillVersionData | null>(null);
|
|
272
|
-
const [loading, setLoading] = useState(true);
|
|
273
|
-
const [error, setError] = useState<string | null>(null);
|
|
274
|
-
|
|
275
|
-
useEffect(() => {
|
|
276
|
-
async function fetchSkill() {
|
|
277
|
-
setLoading(true);
|
|
278
|
-
setError(null);
|
|
279
|
-
|
|
280
|
-
try {
|
|
281
|
-
let skillData: SkillData | null = null;
|
|
282
|
-
|
|
283
|
-
if (skillId) {
|
|
284
|
-
const res = await fetch(`/api/skills/${skillId}`);
|
|
285
|
-
if (res.ok) {
|
|
286
|
-
skillData = await res.json();
|
|
287
|
-
}
|
|
288
|
-
} else if (skillName) {
|
|
289
|
-
const params = new URLSearchParams({ name: skillName });
|
|
290
|
-
if (user) params.set('user', user);
|
|
291
|
-
const res = await fetch(`/api/skills/by-name?${params}`);
|
|
292
|
-
if (res.ok) {
|
|
293
|
-
skillData = await res.json();
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (!skillData) {
|
|
298
|
-
setError('Skill not found');
|
|
299
|
-
setLoading(false);
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
setSkill(skillData);
|
|
304
|
-
|
|
305
|
-
const versionNum = version ? parseInt(version, 10) : skillData.activeVersion;
|
|
306
|
-
const verRes = await fetch(`/api/skills/${skillData.id}/versions/${versionNum}`);
|
|
307
|
-
if (verRes.ok) {
|
|
308
|
-
setSkillVersion(await verRes.json());
|
|
309
|
-
}
|
|
310
|
-
} catch (err) {
|
|
311
|
-
setError('Failed to load skill');
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
setLoading(false);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
fetchSkill();
|
|
318
|
-
}, [skillId, skillName, user, version]);
|
|
319
|
-
|
|
320
|
-
if (loading) {
|
|
321
|
-
return (
|
|
322
|
-
<div style={{ padding: '2rem', color: '#e2e8f0' }}>
|
|
323
|
-
<p>Loading skill...</p>
|
|
324
|
-
</div>
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
if (error || !skill) {
|
|
329
|
-
return (
|
|
330
|
-
<div style={{ padding: '2rem', color: '#e2e8f0' }}>
|
|
331
|
-
<Link href="/" style={{ color: '#60a5fa', marginBottom: '1rem', display: 'inline-block' }}>
|
|
332
|
-
← Back to Dashboard
|
|
333
|
-
</Link>
|
|
334
|
-
<h1 style={{ color: '#f87171' }}>Skill Not Found</h1>
|
|
335
|
-
<p style={{ color: '#94a3b8' }}>
|
|
336
|
-
{error || 'The requested skill could not be found. It may have been deleted.'}
|
|
337
|
-
</p>
|
|
338
|
-
</div>
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
return (
|
|
343
|
-
<div style={{ padding: '2rem', color: '#e2e8f0', maxWidth: '1200px', margin: '0 auto' }}>
|
|
344
|
-
<Link href="/" style={{ color: '#60a5fa', marginBottom: '1rem', display: 'inline-block' }}>
|
|
345
|
-
← Back to Dashboard
|
|
346
|
-
</Link>
|
|
347
|
-
|
|
348
|
-
<div style={{ marginBottom: '2rem' }}>
|
|
349
|
-
<h1 style={{ fontSize: '2rem', fontWeight: 'bold', marginBottom: '0.5rem' }}>
|
|
350
|
-
{skill.name}
|
|
351
|
-
</h1>
|
|
352
|
-
<p style={{ color: '#94a3b8', fontSize: '0.9rem' }}>
|
|
353
|
-
Category: {skill.category || 'Other'} | Version: {version || skill.activeVersion}
|
|
354
|
-
</p>
|
|
355
|
-
</div>
|
|
356
|
-
|
|
357
|
-
{skill.description && (
|
|
358
|
-
<div style={{ marginBottom: '2rem', padding: '1rem', background: '#1e293b', borderRadius: '8px' }}>
|
|
359
|
-
<h3 style={{ color: '#94a3b8', marginBottom: '0.5rem' }}>Description</h3>
|
|
360
|
-
<p>{skill.description}</p>
|
|
361
|
-
</div>
|
|
362
|
-
)}
|
|
363
|
-
|
|
364
|
-
{skillVersion?.changeLog && (
|
|
365
|
-
<div style={{ marginBottom: '2rem', padding: '1rem', background: '#1e293b', borderRadius: '8px' }}>
|
|
366
|
-
<h3 style={{ color: '#94a3b8', marginBottom: '0.5rem' }}>Change Log</h3>
|
|
367
|
-
<p>{skillVersion.changeLog}</p>
|
|
368
|
-
</div>
|
|
369
|
-
)}
|
|
370
|
-
|
|
371
|
-
{skillVersion?.content && (
|
|
372
|
-
<div style={{ marginBottom: '2rem' }}>
|
|
373
|
-
<h3 style={{ color: '#94a3b8', marginBottom: '0.5rem' }}>Skill Content</h3>
|
|
374
|
-
<pre style={{
|
|
375
|
-
padding: '1rem',
|
|
376
|
-
background: '#0f172a',
|
|
377
|
-
borderRadius: '8px',
|
|
378
|
-
overflow: 'auto',
|
|
379
|
-
fontSize: '0.85rem',
|
|
380
|
-
whiteSpace: 'pre-wrap'
|
|
381
|
-
}}>
|
|
382
|
-
{skillVersion.content}
|
|
383
|
-
</pre>
|
|
384
|
-
</div>
|
|
385
|
-
)}
|
|
386
|
-
</div>
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
- [ ] **Step 2: Commit**
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
git add src/app/skills/page.tsx
|
|
395
|
-
git commit -m "feat: add skill detail page with name/ID lookup support"
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
## Chunk 4: Update Details Page
|
|
401
|
-
|
|
402
|
-
### Task 4.1: Modify details page to use SkillLink
|
|
403
|
-
|
|
404
|
-
**Files:**
|
|
405
|
-
- Modify: `src/app/details/page.tsx:1991-1999`
|
|
406
|
-
|
|
407
|
-
- [ ] **Step 1: Add import for SkillLinks**
|
|
408
|
-
|
|
409
|
-
Find the imports section and add:
|
|
410
|
-
```typescript
|
|
411
|
-
import { SkillLinks } from '@/components/SkillLink';
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
- [ ] **Step 2: Replace skill used display**
|
|
415
|
-
|
|
416
|
-
Find lines 1991-1999 and replace with:
|
|
417
|
-
```tsx
|
|
418
|
-
{/* 1. Skills Used */}
|
|
419
|
-
<div style={{ marginBottom: '2rem' }}>
|
|
420
|
-
<h4 style={sectionHeader}>Skills Used</h4>
|
|
421
|
-
<div style={{ ...codeBlock, padding: '0.5rem', background: '#1e293b', borderRadius: '4px', border: '1px solid #334155' }}>
|
|
422
|
-
<SkillLinks
|
|
423
|
-
skills={item.skills}
|
|
424
|
-
skill={item.skill}
|
|
425
|
-
skillVersion={item.skill_version}
|
|
426
|
-
user={item.user}
|
|
427
|
-
/>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
- [ ] **Step 3: Verify changes compile**
|
|
433
|
-
|
|
434
|
-
Run: `npm run build`
|
|
435
|
-
Expected: Build succeeds without errors
|
|
436
|
-
|
|
437
|
-
- [ ] **Step 4: Commit**
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
git add src/app/details/page.tsx
|
|
441
|
-
git commit -m "feat: use SkillLinks in details page for clickable skills"
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
---
|
|
445
|
-
|
|
446
|
-
## Chunk 5: Update Dashboard
|
|
447
|
-
|
|
448
|
-
### Task 5.1: Modify Dashboard to use SkillLink
|
|
449
|
-
|
|
450
|
-
**Files:**
|
|
451
|
-
- Modify: `src/components/Dashboard.tsx:2556-2563`
|
|
452
|
-
|
|
453
|
-
- [ ] **Step 1: Add import for SkillLinks**
|
|
454
|
-
|
|
455
|
-
Find the imports section and add:
|
|
456
|
-
```typescript
|
|
457
|
-
import { SkillLinks } from './SkillLink';
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
- [ ] **Step 2: Replace skill used display**
|
|
461
|
-
|
|
462
|
-
Find lines 2556-2563 and replace with:
|
|
463
|
-
```tsx
|
|
464
|
-
<div className="detail-row">
|
|
465
|
-
<strong style={{ display: 'block', marginBottom: '0.2rem', color: '#94a3b8' }}>Skills Used:</strong>
|
|
466
|
-
<div className="code-block">
|
|
467
|
-
<SkillLinks
|
|
468
|
-
skills={selectedRecord.skills}
|
|
469
|
-
skill={selectedRecord.skill}
|
|
470
|
-
skillVersion={selectedRecord.skill_version}
|
|
471
|
-
user={selectedRecord.user}
|
|
472
|
-
/>
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
- [ ] **Step 3: Verify changes compile**
|
|
478
|
-
|
|
479
|
-
Run: `npm run build`
|
|
480
|
-
Expected: Build succeeds without errors
|
|
481
|
-
|
|
482
|
-
- [ ] **Step 4: Commit**
|
|
483
|
-
|
|
484
|
-
```bash
|
|
485
|
-
git add src/components/Dashboard.tsx
|
|
486
|
-
git commit -m "feat: use SkillLinks in Dashboard for clickable skills"
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
---
|
|
490
|
-
|
|
491
|
-
## Chunk 6: Verification
|
|
492
|
-
|
|
493
|
-
### Task 6.1: Verify all functionality works
|
|
494
|
-
|
|
495
|
-
- [ ] **Step 1: Run development server**
|
|
496
|
-
|
|
497
|
-
Run: `npm run dev`
|
|
498
|
-
Expected: Server starts without errors
|
|
499
|
-
|
|
500
|
-
- [ ] **Step 2: Manual verification checklist**
|
|
501
|
-
|
|
502
|
-
1. Navigate to execution details page - verify skill names are blue and clickable
|
|
503
|
-
2. Click a skill name - verify navigation to skill detail page
|
|
504
|
-
3. Verify skill detail page shows correct skill info
|
|
505
|
-
4. Verify back navigation works
|
|
506
|
-
5. Test with execution that has multiple skills
|
|
507
|
-
6. Test with execution that has no skill (should show "(None)")
|
|
508
|
-
7. Test with deleted skill (should show "Skill Not Found")
|
|
509
|
-
|
|
510
|
-
- [ ] **Step 3: Commit any fixes if needed**
|
|
511
|
-
|
|
512
|
-
```bash
|
|
513
|
-
git add -A
|
|
514
|
-
git commit -m "fix: any issues found during verification"
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
---
|
|
518
|
-
|
|
519
|
-
## Summary
|
|
520
|
-
|
|
521
|
-
| Task | Description | Status |
|
|
522
|
-
|------|-------------|--------|
|
|
523
|
-
| 1.1 | Create API for skill lookup by name | [ ] |
|
|
524
|
-
| 2.1 | Create SkillLink component | [ ] |
|
|
525
|
-
| 3.1 | Create skill detail page | [ ] |
|
|
526
|
-
| 4.1 | Update details page | [ ] |
|
|
527
|
-
| 5.1 | Update Dashboard | [ ] |
|
|
528
|
-
| 6.1 | Verify all functionality | [ ] |
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { NextConfig } from "next";
|
|
2
|
-
|
|
3
|
-
const nextConfig: NextConfig = {
|
|
4
|
-
basePath: process.env.NEXT_PUBLIC_URL_PREFIX || '',
|
|
5
|
-
output: 'standalone',
|
|
6
|
-
serverExternalPackages: ["node-fetch", "pg"],
|
|
7
|
-
experimental: {
|
|
8
|
-
serverActions: {
|
|
9
|
-
allowedOrigins: ["*"] //
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
async rewrites() {
|
|
13
|
-
const urlPrefix = process.env.NEXT_PUBLIC_URL_PREFIX || '';
|
|
14
|
-
|
|
15
|
-
const rewrites = [
|
|
16
|
-
{
|
|
17
|
-
source: '/v1/traces',
|
|
18
|
-
destination: '/api/otel/v1/traces',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
source: '/v1/logs',
|
|
22
|
-
destination: '/api/otel/v1/logs',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
source: '/v1/metrics',
|
|
26
|
-
destination: '/api/otel/v1/metrics',
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
if (urlPrefix) {
|
|
31
|
-
rewrites.push({
|
|
32
|
-
source: `${urlPrefix}/api/:path*`,
|
|
33
|
-
destination: '/api/:path*',
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return rewrites;
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default nextConfig;
|