@lovelybunch/api 1.0.76-alpha.3 → 1.0.76-alpha.5
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/routes/api/v1/knowledge/route.js +26 -32
- package/dist/routes/api/v1/mcp/index.js +2 -1
- package/dist/routes/api/v1/tasks/route.d.ts +18 -38
- package/dist/routes/api/v1/tasks/route.js +94 -16
- package/dist/routes/api/v1/terminal/code/route.js +2 -1
- package/package.json +4 -4
- package/static/assets/{ActivityPage-Cktjpci7.js → ActivityPage-CslBWS6X.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-n-srNxQn.js → ApiKeysSettingsPage-CkOKPKrf.js} +1 -1
- package/static/assets/{ArchitectureEditPage-DG9ahyi7.js → ArchitectureEditPage-B1b0uRMR.js} +1 -1
- package/static/assets/{ArchitecturePage-BfBKdW5c.js → ArchitecturePage-Cp7sQxci.js} +1 -1
- package/static/assets/{AuthSettingsPage-Db1Xoq5F.js → AuthSettingsPage-pKDWh15H.js} +1 -1
- package/static/assets/{CallbackPage-CglxDr9P.js → CallbackPage-BIXrY4bY.js} +1 -1
- package/static/assets/{CodePage-BrgNt-bV.js → CodePage-B-hkmRxg.js} +1 -1
- package/static/assets/{CollapsibleSection-vKx39wB0.js → CollapsibleSection-o6krsTSP.js} +1 -1
- package/static/assets/{DashboardPage-BXGFgfmx.js → DashboardPage-DMSar6gS.js} +1 -1
- package/static/assets/{GitPage-BcjXkIIp.js → GitPage-CuLhUmx3.js} +1 -1
- package/static/assets/{GitSettingsPage-Dkf0xFd3.js → GitSettingsPage-0hTb9m25.js} +1 -1
- package/static/assets/{IdentityPage-B9DlFVs2.js → IdentityPage-BnT1Pl_Z.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-BmhZCJkG.js → ImplementationStepsEditor-CZYwDo8k.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-pY_ByIP_.js → IntegrationsSettingsPage-OKHwk7sn.js} +1 -1
- package/static/assets/{JobDetailPage-DG7g8kZw.js → JobDetailPage-Cx2NNzcF.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-CUTafqOC.js → KnowledgeDetailPage-FhEN7ghj.js} +1 -1
- package/static/assets/{KnowledgeEditPage-DemxKFuT.js → KnowledgeEditPage-3Gcpw7X4.js} +1 -1
- package/static/assets/{KnowledgePage-Cy94lzVN.js → KnowledgePage-BJV1AiB-.js} +1 -1
- package/static/assets/{LoginPage-DIOIFPpd.js → LoginPage-DqhlwRH0.js} +1 -1
- package/static/assets/{MailInboxPage-C0DJJfjN.js → MailInboxPage-8KXJWH6w.js} +1 -1
- package/static/assets/{MailProcessingModal-C5c7Hxr1.js → MailProcessingModal-CtmBLgbc.js} +1 -1
- package/static/assets/{MailReadPage-D850TxKf.js → MailReadPage-DCC3zIGh.js} +1 -1
- package/static/assets/{MailSentPage-DdCosCt5.js → MailSentPage-Bhd8mGgG.js} +1 -1
- package/static/assets/{McpSettingsPage-BFs7optm.js → McpSettingsPage-Bxd-GvVG.js} +1 -1
- package/static/assets/{NewKnowledgePage-CinAhmhe.js → NewKnowledgePage-Sa-rciXx.js} +1 -1
- package/static/assets/{NewSkillPage-_PUiZWTT.js → NewSkillPage-oJowi9lu.js} +1 -1
- package/static/assets/{NewTaskPage-Cj_pFRNh.js → NewTaskPage-CDS-RkoC.js} +1 -1
- package/static/assets/{NotFoundPage-C1WDBXFV.js → NotFoundPage-CtvjPyt4.js} +1 -1
- package/static/assets/{NotificationsSettingsPage-CLi28JAP.js → NotificationsSettingsPage-YtvAFd0j.js} +1 -1
- package/static/assets/{ProjectEditPage-Dr366988.js → ProjectEditPage-Cai5ChhX.js} +1 -1
- package/static/assets/{ProjectPage-DweaymEr.js → ProjectPage-BNudSSbf.js} +1 -1
- package/static/assets/{PromptsSettingsPage-CYJ_llrO.js → PromptsSettingsPage-CKd8AGVR.js} +1 -1
- package/static/assets/{ResourceDetailPage-Q2RCaRRC.js → ResourceDetailPage-C-BRUygH.js} +1 -1
- package/static/assets/{ResourcesPage-DhPwqABQ.js → ResourcesPage-DXOUfQf0.js} +1 -1
- package/static/assets/{RoleEditPage-C31VNX51.js → RoleEditPage-DLdNFFso.js} +1 -1
- package/static/assets/{RolePage-BtP1ZAXn.js → RolePage-BTevB53p.js} +1 -1
- package/static/assets/{RulesSettingsPage-BL9_FzSn.js → RulesSettingsPage-B6oJhn-a.js} +1 -1
- package/static/assets/{SchedulePage-DUAZfOex.js → SchedulePage-Dwkx2rjI.js} +1 -1
- package/static/assets/{SkillDetailPage-DtO9qUkm.js → SkillDetailPage-Bz-LkNJ3.js} +1 -1
- package/static/assets/{SkillEditPage-BeTa_IPy.js → SkillEditPage-SNwPPoP6.js} +1 -1
- package/static/assets/{SkillsPage-D7cQKv9a.js → SkillsPage-CGtOkvBa.js} +1 -1
- package/static/assets/{SkillsSettingsPage-DEWXQvQS.js → SkillsSettingsPage-D8571fog.js} +1 -1
- package/static/assets/{SourceInput-DoUioMfT.js → SourceInput-DM5b_GUu.js} +1 -1
- package/static/assets/{TagInput-BxCMXfcS.js → TagInput-DoOKXUYX.js} +1 -1
- package/static/assets/{TaskDetailPage-DdqyQ4Md.js → TaskDetailPage-94s1cW8j.js} +1 -1
- package/static/assets/{TaskEditPage-Do2nmXct.js → TaskEditPage-xGRv83J_.js} +1 -1
- package/static/assets/{TasksPage-CnvtbfDU.js → TasksPage-8EB0-o-U.js} +1 -1
- package/static/assets/{TerminalPage-DoijWtPu.js → TerminalPage-Bo3-xkxM.js} +1 -1
- package/static/assets/{TerminalSessionPage-DpDou_1W.js → TerminalSessionPage-BJRC12CC.js} +1 -1
- package/static/assets/{UserPreferencesPage-Delx2st9.js → UserPreferencesPage-DBAGWIrp.js} +1 -1
- package/static/assets/{UserSettingsPage-BzvZ0ENB.js → UserSettingsPage-DgCpjDSU.js} +1 -1
- package/static/assets/{UtilitiesPage-Dn1sRlZ5.js → UtilitiesPage-CDUv_Oaf.js} +1 -1
- package/static/assets/{alert-rjIgDS-V.js → alert-BMUNUSMK.js} +1 -1
- package/static/assets/{arrow-down-BUF9PsVt.js → arrow-down-BF7Abk86.js} +1 -1
- package/static/assets/{arrow-left-D3otDKod.js → arrow-left-C2-Sl2bI.js} +1 -1
- package/static/assets/{arrow-up-D_qb79lZ.js → arrow-up-9fnGGmZL.js} +1 -1
- package/static/assets/{arrow-up-down-DNI83nZr.js → arrow-up-down-B1FbVeIs.js} +1 -1
- package/static/assets/{badge-D2aQlcxQ.js → badge-CNyAEmE0.js} +1 -1
- package/static/assets/{browser-modal-Cdsk2tVF.js → browser-modal-BAShTxJB.js} +1 -1
- package/static/assets/{card-CxtDjDKY.js → card-BvtnQC9t.js} +1 -1
- package/static/assets/{chevron-left--lDS1l8m.js → chevron-left-DX764A0x.js} +1 -1
- package/static/assets/{chevron-up-CjDDMMJu.js → chevron-up-DytAcGho.js} +1 -1
- package/static/assets/{chevrons-up-BB0xPeZH.js → chevrons-up-BuCS2RR5.js} +1 -1
- package/static/assets/{circle-alert-BMJmMq2s.js → circle-alert-DizYv0IJ.js} +1 -1
- package/static/assets/{circle-check-ByTq4NJ8.js → circle-check-BeNzwcb4.js} +1 -1
- package/static/assets/{circle-check-big-ffEHzVVe.js → circle-check-big-DEZcW9-c.js} +1 -1
- package/static/assets/{circle-play-1hF_cA0H.js → circle-play-DuxMLqFr.js} +1 -1
- package/static/assets/{circle-x-DmE_F1rc.js → circle-x-BRLHtYhj.js} +1 -1
- package/static/assets/{clipboard-BjaDjgWb.js → clipboard-CRczIbtb.js} +1 -1
- package/static/assets/{clock-BB0UgsVd.js → clock-CNttSfN6.js} +1 -1
- package/static/assets/{code-DOk08pmu.js → code-ClRsBG4Z.js} +1 -1
- package/static/assets/{download-Dcxv9aVW.js → download-gjdnhnM_.js} +1 -1
- package/static/assets/{external-link-DIMKYjHG.js → external-link-CTmfnP6Q.js} +1 -1
- package/static/assets/{eye-jNavJOmE.js → eye-oaenIcQg.js} +1 -1
- package/static/assets/{folder-git-2-CYrsj8b-.js → folder-git-2-DalKErlr.js} +1 -1
- package/static/assets/{index-dad-EstO.js → index-AiRw6xlj.js} +1 -1
- package/static/assets/{index-BA3w3CnT.js → index-B0vRXjXH.js} +1 -1
- package/static/assets/{index-Dnh3d5dh.js → index-BCJCpqiX.js} +3 -3
- package/static/assets/{index-Bnh1XFKf.js → index-BMaB-vpV.js} +1 -1
- package/static/assets/{index-SImVYpAE.js → index-BNBmCbpi.js} +1 -1
- package/static/assets/{index-CWpX8DAq.js → index-BowZ9B-c.js} +1 -1
- package/static/assets/{index-BVRdkhj2.js → index-BwI7jWTF.js} +1 -1
- package/static/assets/{index-B80Gxduz.js → index-C3YnmsX2.js} +1 -1
- package/static/assets/{index-CsUt0G9A.js → index-CRJdZDwN.js} +1 -1
- package/static/assets/{index-BfNvp3tP.js → index-CS1oPa_J.js} +1 -1
- package/static/assets/{index-CD4GQ7sO.js → index-CcbeRnPr.js} +1 -1
- package/static/assets/{index-CVuqy6zg.js → index-Co3_Npsk.js} +1 -1
- package/static/assets/{index-BduAKlgn.js → index-CyveSWgT.js} +1 -1
- package/static/assets/{index-CP0Sm80t.js → index-DQSrwPiT.js} +1 -1
- package/static/assets/{index-QNazGQsT.js → index-DewSp98-.js} +1 -1
- package/static/assets/{index-CMVAyePi.js → index-VDQ7OA3y.js} +1 -1
- package/static/assets/{index-CjdjJ5zF.js → index-doLG5C2n.js} +1 -1
- package/static/assets/{index-Be7gMvi9.js → index-oA4kXVr8.js} +1 -1
- package/static/assets/{index-q8NyCSdt.js → index-tb2ceoIp.js} +1 -1
- package/static/assets/{info-Yy5O8i5m.js → info-DUjlidt3.js} +1 -1
- package/static/assets/{label-Cz7OkZOa.js → label-DRKhH7ga.js} +1 -1
- package/static/assets/{markdown-editor-BB9LQlVV.js → markdown-editor-OI3fuHsN.js} +3 -3
- package/static/assets/{message-square-CM5C3WrG.js → message-square-b4Ycb1PY.js} +1 -1
- package/static/assets/{paperclip-DeU_srFt.js → paperclip-CbPyWpnw.js} +1 -1
- package/static/assets/{pause-CTaIY1s_.js → pause-BHaEx4aT.js} +1 -1
- package/static/assets/{play-B1b-UHj0.js → play-3wS9bypH.js} +1 -1
- package/static/assets/{radio-group-BWLXdTdF.js → radio-group-DHicQy_R.js} +1 -1
- package/static/assets/{refresh-cw-DY5O1wul.js → refresh-cw-BzAty17h.js} +1 -1
- package/static/assets/{search-B1RvqxVs.js → search-JZd6JxnR.js} +1 -1
- package/static/assets/{select-DGSoJZ_9.js → select-B-jKKvfS.js} +1 -1
- package/static/assets/{switch-BD6hHCvO.js → switch-eaA0aAvD.js} +1 -1
- package/static/assets/{tabs-gR86EHwh.js → tabs-DWgE2aSE.js} +1 -1
- package/static/assets/{tag-B6vbC3rM.js → tag-CKqXGexN.js} +1 -1
- package/static/assets/{terminal-preview-BF6OYmEL.js → terminal-preview-COD7icw5.js} +1 -1
- package/static/assets/{use-terminal-D6UJQuYa.js → use-terminal-B2c7rWHu.js} +1 -1
- package/static/assets/{video-NvQlXQ8s.js → video-B1rgIDew.js} +1 -1
- package/static/index.html +1 -1
|
@@ -3,6 +3,7 @@ import { promises as fs } from 'fs';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import matter from 'gray-matter';
|
|
5
5
|
import filenameRoute from './[filename]/index.js';
|
|
6
|
+
import { listKnowledge } from '@lovelybunch/core';
|
|
6
7
|
import { getLogger, KnowledgeKinds } from '@lovelybunch/core/logging';
|
|
7
8
|
import { requireAuth } from '../../../../middleware/auth.js';
|
|
8
9
|
// Helper function to generate a simple summary from content
|
|
@@ -50,43 +51,36 @@ function generateFilename(title) {
|
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* GET /api/v1/knowledge
|
|
53
|
-
* Load all knowledge documents
|
|
54
|
+
* Load all knowledge documents.
|
|
55
|
+
*
|
|
56
|
+
* Query params:
|
|
57
|
+
* q - search/filter query (fuzzy match on title, content, tags, category)
|
|
58
|
+
* full - set to "true" to include the full markdown content (default: summary only)
|
|
59
|
+
* limit - max results per page (1-100)
|
|
60
|
+
* offset - number of results to skip (for pagination, default: 0)
|
|
54
61
|
*/
|
|
55
62
|
app.get('/', async (c) => {
|
|
56
63
|
try {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
]);
|
|
69
|
-
const { data, content } = matter(fileContent);
|
|
70
|
-
// Extract title from metadata, first heading, or use filename
|
|
71
|
-
const title = data.title ||
|
|
72
|
-
content.match(/^#\s+(.+)$/m)?.[1] ||
|
|
73
|
-
file.replace('.md', '').replace(/[_-]/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
|
|
74
|
-
return {
|
|
75
|
-
filename: file,
|
|
76
|
-
metadata: {
|
|
77
|
-
...data,
|
|
78
|
-
title, // Include title in metadata
|
|
79
|
-
updated: stats.mtime.toISOString(),
|
|
80
|
-
tags: data.tags || [],
|
|
81
|
-
sources: data.sources || []
|
|
82
|
-
},
|
|
83
|
-
content,
|
|
84
|
-
title
|
|
85
|
-
};
|
|
86
|
-
}));
|
|
64
|
+
const query = c.req.query('q') || undefined;
|
|
65
|
+
const full = c.req.query('full') === 'true';
|
|
66
|
+
const limitParam = c.req.query('limit');
|
|
67
|
+
const limit = limitParam ? Math.min(Math.max(1, parseInt(limitParam, 10) || 20), 100) : undefined;
|
|
68
|
+
const offsetParam = c.req.query('offset');
|
|
69
|
+
const offset = offsetParam ? Math.max(0, parseInt(offsetParam, 10) || 0) : 0;
|
|
70
|
+
let documents = await listKnowledge({ query, full });
|
|
71
|
+
const totalCount = documents.length;
|
|
72
|
+
if (limit !== undefined || offset > 0) {
|
|
73
|
+
documents = documents.slice(offset, limit !== undefined ? offset + limit : undefined);
|
|
74
|
+
}
|
|
87
75
|
return c.json({
|
|
88
76
|
success: true,
|
|
89
|
-
|
|
77
|
+
query,
|
|
78
|
+
full,
|
|
79
|
+
totalCount,
|
|
80
|
+
count: documents.length,
|
|
81
|
+
...(limit !== undefined && { limit }),
|
|
82
|
+
offset,
|
|
83
|
+
documents,
|
|
90
84
|
});
|
|
91
85
|
}
|
|
92
86
|
catch (error) {
|
|
@@ -260,10 +260,11 @@ async function executeKnowledgeTool(c, args) {
|
|
|
260
260
|
switch (operation) {
|
|
261
261
|
case 'list': {
|
|
262
262
|
const searchQuery = query && typeof query === 'string' ? query : undefined;
|
|
263
|
-
const documents = await listKnowledge({ query: searchQuery });
|
|
263
|
+
const documents = await listKnowledge({ query: searchQuery, full: false });
|
|
264
264
|
return c.json({
|
|
265
265
|
success: true,
|
|
266
266
|
data: documents,
|
|
267
|
+
count: documents.length,
|
|
267
268
|
message: searchQuery
|
|
268
269
|
? `Found ${documents.length} knowledge documents matching "${searchQuery}"`
|
|
269
270
|
: `Found ${documents.length} knowledge documents`
|
|
@@ -1,45 +1,25 @@
|
|
|
1
1
|
import { Context } from 'hono';
|
|
2
|
+
/**
|
|
3
|
+
* GET /api/v1/tasks
|
|
4
|
+
*
|
|
5
|
+
* Query params:
|
|
6
|
+
* q - fuzzy search query (title, content, id, author, tags)
|
|
7
|
+
* status - filter by status
|
|
8
|
+
* author - filter by author
|
|
9
|
+
* priority - filter by priority
|
|
10
|
+
* tags - comma-separated tag filter
|
|
11
|
+
* limit - max results per page (1-100, default: all)
|
|
12
|
+
* offset - number of results to skip (for pagination, default: 0)
|
|
13
|
+
* full - set to "true" to include full content, planSteps, and comments
|
|
14
|
+
*/
|
|
2
15
|
export declare function GET(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
16
|
+
offset: number;
|
|
17
|
+
data: never[];
|
|
18
|
+
limit: number;
|
|
3
19
|
totalCount: number;
|
|
20
|
+
count: number;
|
|
21
|
+
query?: string;
|
|
4
22
|
success: true;
|
|
5
|
-
data: {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
intent?: string;
|
|
9
|
-
content?: string;
|
|
10
|
-
author: {
|
|
11
|
-
type: import("@lovelybunch/types").AuthorType;
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
email?: string;
|
|
15
|
-
};
|
|
16
|
-
productSpecRef?: string;
|
|
17
|
-
planSteps: {
|
|
18
|
-
id: string;
|
|
19
|
-
description: string;
|
|
20
|
-
command?: string;
|
|
21
|
-
expectedOutcome?: string;
|
|
22
|
-
status: "pending" | "active" | "done" | "failed" | "skipped";
|
|
23
|
-
output?: string;
|
|
24
|
-
error?: string;
|
|
25
|
-
executedAt?: string;
|
|
26
|
-
}[];
|
|
27
|
-
status: import("@lovelybunch/types").TaskStatus;
|
|
28
|
-
comments?: {
|
|
29
|
-
id: string;
|
|
30
|
-
author: string;
|
|
31
|
-
content: string;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
}[];
|
|
34
|
-
metadata: {
|
|
35
|
-
createdAt: string;
|
|
36
|
-
updatedAt: string;
|
|
37
|
-
reviewers: string[];
|
|
38
|
-
tags?: string[];
|
|
39
|
-
priority?: "low" | "medium" | "high" | "critical";
|
|
40
|
-
readiness?: number;
|
|
41
|
-
};
|
|
42
|
-
}[];
|
|
43
23
|
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
44
24
|
success: false;
|
|
45
25
|
error: {
|
|
@@ -3,7 +3,64 @@ import { getAuthorInfo } from '../../../../lib/user-preferences.js';
|
|
|
3
3
|
import Fuse from 'fuse.js';
|
|
4
4
|
import { getLogger } from '@lovelybunch/core/logging';
|
|
5
5
|
const storage = new FileStorageAdapter();
|
|
6
|
-
|
|
6
|
+
const MAX_SUMMARY_CHARS = 200;
|
|
7
|
+
function summarizeContent(content) {
|
|
8
|
+
if (!content)
|
|
9
|
+
return '';
|
|
10
|
+
const cleaned = content
|
|
11
|
+
.replace(/^#+\s+/gm, '')
|
|
12
|
+
.replace(/[*_`]/g, '')
|
|
13
|
+
.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
|
|
14
|
+
.trim();
|
|
15
|
+
const lines = cleaned.split('\n').filter(l => l.trim().length > 0);
|
|
16
|
+
const summary = lines.slice(0, 3).join(' ');
|
|
17
|
+
return summary.length > MAX_SUMMARY_CHARS
|
|
18
|
+
? summary.substring(0, MAX_SUMMARY_CHARS) + '...'
|
|
19
|
+
: summary;
|
|
20
|
+
}
|
|
21
|
+
function extractSnippet(text, query, maxLen = 200) {
|
|
22
|
+
if (!text)
|
|
23
|
+
return '';
|
|
24
|
+
const lower = text.toLowerCase();
|
|
25
|
+
const terms = query.toLowerCase().split(/\s+/);
|
|
26
|
+
let bestIdx = -1;
|
|
27
|
+
for (const term of terms) {
|
|
28
|
+
const idx = lower.indexOf(term);
|
|
29
|
+
if (idx !== -1 && (bestIdx === -1 || idx < bestIdx))
|
|
30
|
+
bestIdx = idx;
|
|
31
|
+
}
|
|
32
|
+
if (bestIdx === -1)
|
|
33
|
+
return text.slice(0, maxLen) + (text.length > maxLen ? '...' : '');
|
|
34
|
+
const start = Math.max(0, bestIdx - 60);
|
|
35
|
+
const end = Math.min(text.length, bestIdx + 140);
|
|
36
|
+
let snippet = text.slice(start, end);
|
|
37
|
+
if (start > 0)
|
|
38
|
+
snippet = '...' + snippet;
|
|
39
|
+
if (end < text.length)
|
|
40
|
+
snippet += '...';
|
|
41
|
+
return snippet;
|
|
42
|
+
}
|
|
43
|
+
function toLightweight(task) {
|
|
44
|
+
const { content, comments, ...rest } = task;
|
|
45
|
+
return {
|
|
46
|
+
...rest,
|
|
47
|
+
content: summarizeContent(content),
|
|
48
|
+
commentCount: comments?.length ?? 0,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* GET /api/v1/tasks
|
|
53
|
+
*
|
|
54
|
+
* Query params:
|
|
55
|
+
* q - fuzzy search query (title, content, id, author, tags)
|
|
56
|
+
* status - filter by status
|
|
57
|
+
* author - filter by author
|
|
58
|
+
* priority - filter by priority
|
|
59
|
+
* tags - comma-separated tag filter
|
|
60
|
+
* limit - max results per page (1-100, default: all)
|
|
61
|
+
* offset - number of results to skip (for pagination, default: 0)
|
|
62
|
+
* full - set to "true" to include full content, planSteps, and comments
|
|
63
|
+
*/
|
|
7
64
|
export async function GET(c) {
|
|
8
65
|
try {
|
|
9
66
|
const url = new URL(c.req.url);
|
|
@@ -15,36 +72,57 @@ export async function GET(c) {
|
|
|
15
72
|
const searchQuery = searchParams.get('q');
|
|
16
73
|
const limitParam = searchParams.get('limit');
|
|
17
74
|
const limit = limitParam ? Math.min(Math.max(1, parseInt(limitParam, 10) || 20), 100) : undefined;
|
|
75
|
+
const offsetParam = searchParams.get('offset');
|
|
76
|
+
const offset = offsetParam ? Math.max(0, parseInt(offsetParam, 10) || 0) : 0;
|
|
77
|
+
const full = searchParams.get('full') === 'true';
|
|
18
78
|
let tasks = await storage.listTasks({
|
|
19
79
|
status,
|
|
20
80
|
author: author || undefined,
|
|
21
81
|
priority: priority || undefined,
|
|
22
82
|
tags
|
|
23
83
|
});
|
|
24
|
-
|
|
84
|
+
let data;
|
|
25
85
|
if (searchQuery?.trim()) {
|
|
26
86
|
const fuse = new Fuse(tasks, {
|
|
27
87
|
keys: [
|
|
28
|
-
{ name: 'title', weight:
|
|
29
|
-
{ name: '
|
|
30
|
-
{ name: '
|
|
31
|
-
{ name: '
|
|
32
|
-
{ name: '
|
|
88
|
+
{ name: 'title', weight: 2 },
|
|
89
|
+
{ name: 'content', weight: 1 },
|
|
90
|
+
{ name: 'intent', weight: 1.5 },
|
|
91
|
+
{ name: 'id', weight: 1 },
|
|
92
|
+
{ name: 'author.name', weight: 0.5 },
|
|
93
|
+
{ name: 'metadata.tags', weight: 1.5 }
|
|
33
94
|
],
|
|
34
|
-
threshold: 0.
|
|
35
|
-
includeScore: true
|
|
95
|
+
threshold: 0.15,
|
|
96
|
+
includeScore: true,
|
|
97
|
+
ignoreLocation: true,
|
|
98
|
+
minMatchCharLength: 3,
|
|
99
|
+
});
|
|
100
|
+
const MAX_SCORE = 0.85;
|
|
101
|
+
const results = fuse.search(searchQuery).filter(r => (r.score ?? 1) <= MAX_SCORE);
|
|
102
|
+
data = results.map(result => {
|
|
103
|
+
const base = full ? result.item : toLightweight(result.item);
|
|
104
|
+
return {
|
|
105
|
+
...base,
|
|
106
|
+
snippet: extractSnippet(result.item.content || result.item.title || '', searchQuery),
|
|
107
|
+
score: result.score,
|
|
108
|
+
};
|
|
36
109
|
});
|
|
37
|
-
const searchResults = fuse.search(searchQuery);
|
|
38
|
-
tasks = searchResults.map(result => result.item);
|
|
39
110
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
111
|
+
else {
|
|
112
|
+
data = full ? tasks : tasks.map(toLightweight);
|
|
113
|
+
}
|
|
114
|
+
const totalCount = data.length;
|
|
115
|
+
if (limit !== undefined || offset > 0) {
|
|
116
|
+
data = data.slice(offset, limit !== undefined ? offset + limit : undefined);
|
|
43
117
|
}
|
|
44
118
|
return c.json({
|
|
45
119
|
success: true,
|
|
46
|
-
|
|
47
|
-
|
|
120
|
+
...(searchQuery ? { query: searchQuery } : {}),
|
|
121
|
+
totalCount,
|
|
122
|
+
count: data.length,
|
|
123
|
+
...(limit !== undefined && { limit }),
|
|
124
|
+
offset,
|
|
125
|
+
data,
|
|
48
126
|
});
|
|
49
127
|
}
|
|
50
128
|
catch (error) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { promises as fs } from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { tmpdir } from 'os';
|
|
3
4
|
import matter from 'gray-matter';
|
|
4
5
|
import { getGlobalTerminalManager } from '../../../../../lib/terminal/global-manager.js';
|
|
5
6
|
import { loadUserSettings } from '../../../../../lib/user-preferences.js';
|
|
@@ -135,7 +136,7 @@ export async function POST(c) {
|
|
|
135
136
|
customInstruction: body.customInstructions,
|
|
136
137
|
interactive: body.interactive ?? true,
|
|
137
138
|
});
|
|
138
|
-
const tmpDir = await fs.mkdtemp(path.join(
|
|
139
|
+
const tmpDir = await fs.mkdtemp(path.join(tmpdir(), 'nut-pipeline-'));
|
|
139
140
|
const scriptPath = path.join(tmpDir, 'run.js');
|
|
140
141
|
await fs.writeFile(scriptPath, script, 'utf-8');
|
|
141
142
|
const interactive = body.interactive ?? true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.76-alpha.
|
|
3
|
+
"version": "1.0.76-alpha.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@ai-sdk/anthropic": "^3.0.41",
|
|
38
38
|
"@hono/node-server": "^1.13.7",
|
|
39
39
|
"@hono/node-ws": "^1.0.6",
|
|
40
|
-
"@lovelybunch/core": "^1.0.76-alpha.
|
|
41
|
-
"@lovelybunch/mcp": "^1.0.76-alpha.
|
|
42
|
-
"@lovelybunch/types": "^1.0.76-alpha.
|
|
40
|
+
"@lovelybunch/core": "^1.0.76-alpha.5",
|
|
41
|
+
"@lovelybunch/mcp": "^1.0.76-alpha.5",
|
|
42
|
+
"@lovelybunch/types": "^1.0.76-alpha.5",
|
|
43
43
|
"adm-zip": "^0.5.16",
|
|
44
44
|
"ai": "^6.0.79",
|
|
45
45
|
"arctic": "^1.9.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,A as p,j as e,t as y,bI as v,B as N,n as w,C as b}from"./index-
|
|
1
|
+
import{r as a,A as p,j as e,t as y,bI as v,B as N,n as w,C as b}from"./index-BCJCpqiX.js";import{C as c,a as d,b as k,c as C}from"./card-BvtnQC9t.js";import{B as m}from"./badge-CNyAEmE0.js";import{R as E}from"./refresh-cw-BzAty17h.js";const A=5e3;function $(){const[n,o]=a.useState([]),[i,x]=a.useState(!0),[h,u]=a.useState(new Set),l=a.useCallback(async()=>{x(!0);try{const s=await fetch(`${p}/api/v1/events?limit=${A}`);if(!s.ok)throw new Error("Failed to load events");const t=await s.json();o(Array.isArray(t.items)?[...t.items].reverse():[])}catch(s){console.error("Failed to load events:",s),o([])}finally{x(!1)}},[]),g=a.useCallback(s=>{u(t=>{const r=new Set(t);return r.has(s)?r.delete(s):r.add(s),r})},[]);a.useEffect(()=>{l()},[l]);const f=s=>{if(!s)return"Unknown time";try{return new Date(s).toLocaleString()}catch{return s}},j=s=>{switch(s?.toLowerCase()){case"error":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";case"warn":case"warning":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";case"info":return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";case"debug":return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}};return i?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsx("p",{className:"text-muted-foreground",children:"View system activity and events"})]}),e.jsx(c,{children:e.jsx(d,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading events..."})]})})})]}):n.length===0?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsx("p",{className:"text-muted-foreground",children:"View system activity and events"})]}),e.jsx(c,{children:e.jsx(d,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(v,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Events Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Activity events will appear here as they occur."})]})})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsxs("p",{className:"text-muted-foreground",children:["View system activity and events (",n.length," events)"]})]}),e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>void l(),disabled:i,children:[e.jsx(E,{className:`h-4 w-4 mr-2 ${i?"animate-spin":""}`}),"Refresh"]})]}),e.jsx("div",{className:"space-y-3",children:n.map(s=>{const t=h.has(s.seq);return e.jsxs(c,{className:"transition-colors",children:[e.jsx(k,{className:"py-3 cursor-pointer hover:bg-muted/30",onClick:()=>g(s.seq),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-2 flex-1 min-w-0",children:[t?e.jsx(w,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}):e.jsx(b,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(C,{className:"text-sm font-medium",children:["#",s.seq]}),s.kind&&e.jsx(m,{variant:"outline",className:"text-xs",children:s.kind}),s.level&&e.jsx(m,{className:`text-xs ${j(s.level)}`,children:s.level})]}),s.message&&e.jsx("p",{className:`text-sm text-muted-foreground ${t?"":"truncate"}`,children:s.message})]})]}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:f(s.ts)})]})}),t&&e.jsx(d,{className:"pt-0 pb-4",children:e.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:JSON.stringify(s,null,2)})})]},s.seq)})})]})}export{$ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as R,r as t,bw as y,j as e,B as a,P as W,bx as X,E as Y,D as j,b as g,d as v,f,g as A,I as F,W as N,af as J,v as i}from"./index-
|
|
1
|
+
import{s as R,r as t,bw as y,j as e,B as a,P as W,bx as X,E as Y,D as j,b as g,d as v,f,g as A,I as F,W as N,af as J,v as i}from"./index-BCJCpqiX.js";import{C as G,b as Q,c as V,d as Z,a as _}from"./card-BvtnQC9t.js";import{L as w}from"./label-DRKhH7ga.js";import{B as ee}from"./badge-CNyAEmE0.js";import{A as I,a as C}from"./alert-BMUNUSMK.js";import{I as L}from"./info-DUjlidt3.js";import{C as se}from"./circle-alert-DizYv0IJ.js";function oe(){const{authEnabled:n}=R(),[P,k]=t.useState([]),[b,K]=t.useState(!0),[O,l]=t.useState(!1),[M,d]=t.useState(!1),[x,D]=t.useState(""),[h,E]=t.useState("never"),[c,S]=t.useState(null),[m,o]=t.useState(null);t.useEffect(()=>{p()},[]);const p=async()=>{K(!0);try{const s=await y("/api/v1/api-keys");s.success&&k(s.data?.apiKeys||[])}catch(s){console.error("Failed to load API keys:",s),k([])}finally{K(!1)}},U=async()=>{if(!x.trim()){i({title:"Error",description:"Please provide a name for the API key",variant:"destructive"});return}try{const s={name:x,scopes:["*"]};h!=="never"&&(s.expiresIn=h);const r=await y("/api/v1/api-keys",{method:"POST",body:JSON.stringify(s)});r.success&&(S(r.data),l(!1),d(!0),D(""),E("never"),await p(),i({title:"API Key Created",description:"Make sure to copy your API key now. You won't be able to see it again!"}))}catch(s){console.error("Failed to create API key:",s),i({title:"Error",description:"Failed to create API key",variant:"destructive"})}},B=async s=>{try{(await y(`/api/v1/api-keys/${s}`,{method:"DELETE"})).success&&(await p(),o(null),i({title:"API Key Deleted",description:"The API key has been permanently deleted"}))}catch(r){console.error("Failed to delete API key:",r),i({title:"Error",description:"Failed to delete API key",variant:"destructive"})}},H=async s=>{try{await navigator.clipboard.writeText(s),i({title:"Copied",description:"API key copied to clipboard"})}catch{i({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},u=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),$=s=>s?new Date(s)<new Date:!1,q=typeof window<"u"?window.location.origin:"http://localhost:3000",z=c?`curl -H "X-API-Key: ${c.key}" \\
|
|
2
2
|
+ ${q}/api/v1/tasks`:"",T=n?null:e.jsxs(I,{children:[e.jsx(L,{className:"h-4 w-4"}),e.jsxs(C,{children:["Authentication is currently disabled. API keys will only be required once you enable authentication in the ",e.jsx("a",{href:"/settings/authentication",className:"underline",children:"Authentication settings"}),"."]})]});return!n&&b?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access"})]}),T]}):b?e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access to your Coconut instance"})]}),T,n&&e.jsxs(I,{children:[e.jsx(L,{className:"h-4 w-4"}),e.jsxs(C,{children:["API keys provide programmatic access to your Coconut instance. Use them in CI/CD pipelines or automation scripts by including the key in the ",e.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"X-API-Key"})," header."]})]}),e.jsxs(G,{children:[e.jsx(Q,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(V,{children:"Active API Keys"}),e.jsx(Z,{children:"API keys you've created for programmatic access"})]}),e.jsxs(a,{onClick:()=>l(!0),disabled:!n,children:[e.jsx(W,{className:"mr-2 h-4 w-4"}),"Create API Key"]})]})}),e.jsx(_,{children:P.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(X,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),e.jsx("p",{children:"No API keys yet"}),e.jsx("p",{className:"text-sm",children:"Create an API key to get started with programmatic access"})]}):e.jsx("div",{className:"space-y-4",children:P.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("p",{className:"font-medium",children:s.name}),$(s.expiresAt)&&e.jsx(ee,{variant:"destructive",children:"Expired"})]}),e.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:s.keyPreview}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Created: ",u(s.createdAt)]}),s.expiresAt&&e.jsxs("span",{children:["Expires: ",u(s.expiresAt)]}),s.lastUsedAt&&e.jsxs("span",{children:["Last used: ",u(s.lastUsedAt)]})]})]}),e.jsx(a,{variant:"ghost",size:"icon",onClick:()=>o(s.id),children:e.jsx(Y,{className:"h-4 w-4 text-destructive"})})]},s.id))})})]}),e.jsx(j,{open:O,onOpenChange:l,children:e.jsxs(g,{children:[e.jsxs(v,{children:[e.jsx(f,{children:"Create API Key"}),e.jsx(A,{children:"Create a new API key for programmatic access. The key will only be shown once."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"keyName",children:"Name"}),e.jsx(F,{id:"keyName",placeholder:"CI/CD Pipeline",value:x,onChange:s=>D(s.target.value)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"A descriptive name to identify this API key"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"keyExpiry",children:"Expiration"}),e.jsxs("select",{id:"keyExpiry",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:h,onChange:s=>E(s.target.value),children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"30d",children:"30 days"}),e.jsx("option",{value:"90d",children:"90 days"}),e.jsx("option",{value:"1y",children:"1 year"})]})]})]}),e.jsxs(N,{children:[e.jsx(a,{variant:"outline",onClick:()=>l(!1),children:"Cancel"}),e.jsx(a,{onClick:U,disabled:!n,children:"Create API Key"})]})]})}),e.jsx(j,{open:M,onOpenChange:d,children:e.jsxs(g,{className:"sm:max-w-[600px]",children:[e.jsxs(v,{children:[e.jsx(f,{children:"API Key Created"}),e.jsx(A,{children:"Make sure to copy your API key now. You won't be able to see it again!"})]}),e.jsxs(I,{variant:"destructive",className:"my-4",children:[e.jsx(se,{className:"h-4 w-4"}),e.jsx(C,{children:"This is the only time you will see this key. Store it securely."})]}),c&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"API Key"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(F,{readOnly:!0,value:c.key,className:"font-mono text-sm"}),e.jsx(a,{variant:"outline",size:"icon",onClick:()=>H(c.key),children:e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.jsx("p",{className:"mb-2",children:"Usage example:"}),e.jsx("pre",{className:"bg-muted p-3 rounded-md whitespace-pre-wrap break-words",children:e.jsx("code",{className:"font-mono text-xs",children:z})})]})]}),e.jsx(N,{children:e.jsx(a,{onClick:()=>{d(!1),S(null)},children:"I've Saved My Key"})})]})}),e.jsx(j,{open:!!m,onOpenChange:s=>!s&&o(null),children:e.jsxs(g,{children:[e.jsxs(v,{children:[e.jsx(f,{children:"Delete API Key"}),e.jsx(A,{children:"Are you sure you want to delete this API key? This action cannot be undone and any scripts using this key will stop working."})]}),e.jsxs(N,{children:[e.jsx(a,{variant:"outline",onClick:()=>o(null),children:"Cancel"}),e.jsx(a,{variant:"destructive",onClick:()=>m&&B(m),children:"Delete API Key"})]})]})})]})}export{oe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as D,a as M,r as l,A as b,j as e,B as S,L as I,a0 as _,I as d,o as B}from"./index-
|
|
1
|
+
import{u as D,a as M,r as l,A as b,j as e,B as S,L as I,a0 as _,I as d,o as B}from"./index-BCJCpqiX.js";import{C as u,a as p,b as j,c as v}from"./card-BvtnQC9t.js";import{L as o}from"./label-DRKhH7ga.js";import{M as P}from"./markdown-editor-OI3fuHsN.js";import{A as R}from"./arrow-left-C2-Sl2bI.js";import{C as $}from"./circle-check-big-DEZcW9-c.js";import"./index-BNBmCbpi.js";function W(){const F=D(),{toast:h}=M(),[n,x]=l.useState({stack:{runtime:"",framework:"",language:"",database:"",deployment:"",repository:""},commands:{}}),[y,f]=l.useState(""),[E,k]=l.useState(""),[L,N]=l.useState(!0),[C,w]=l.useState(!1);l.useEffect(()=>{fetch(`${b}/api/v1/context/architecture`).then(t=>t.json()).then(t=>{if(t.success){const a=t.document,m={stack:{runtime:a.metadata.stack?.runtime||"",framework:a.metadata.stack?.framework||"",language:a.metadata.stack?.language||"",database:a.metadata.stack?.database||"",deployment:a.metadata.stack?.deployment||"",repository:a.metadata.stack?.repository||""},commands:a.metadata.commands||{}};x(m);const s=Object.entries(m.commands).map(([r,c])=>`${r}: ${c}`).join(`
|
|
2
2
|
`);k(s),f(a.content.trim())}N(!1)}).catch(t=>{console.error("Failed to load context:",t),h({title:"Error",description:"Failed to load architecture documentation",variant:"destructive"}),N(!1)})},[h]);const A=async()=>{w(!0);try{const a=await(await fetch(`${b}/api/v1/context/architecture`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y,metadata:{stack:n.stack,commands:n.commands}})})).json();if(a.success)h({title:"Success",description:"Architecture documentation saved successfully",action:e.jsx($,{className:"h-4 w-4"})}),F("/context/architecture");else throw new Error(a.error||"Failed to save context")}catch(t){console.error("Save error:",t),h({title:"Error",description:"Failed to save architecture documentation",variant:"destructive"})}finally{w(!1)}},i=(t,a)=>{x(m=>{const s={...m},r=t.split(".");let c=s;for(let g=0;g<r.length-1;g++)c=c[r[g]];return c[r[r.length-1]]=a,s})},T=t=>{k(t);const a={};t.split(`
|
|
3
3
|
`).filter(s=>s.trim()).forEach(s=>{const[r,...c]=s.split(":");r&&c.length>0&&(a[r.trim()]=c.join(":").trim())}),x(s=>({...s,commands:a}))};return L?e.jsx("div",{className:"space-y-6",children:e.jsx(u,{children:e.jsx(p,{className:"pt-6",children:e.jsx("div",{className:"text-center",children:e.jsx("p",{children:"Loading..."})})})})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Edit Architecture"}),e.jsx("p",{className:"text-muted-foreground text-sm hidden sm:block",children:"Edit technical architecture and supporting metadata"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(S,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(I,{to:"/context/architecture",className:"text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(R,{className:"w-4 h-4"})})}),e.jsxs(S,{onClick:A,disabled:C,size:"sm",children:[e.jsx(_,{className:"w-4 h-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:C?"Saving...":"Save"})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Technology Stack"})}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"runtime",children:"Runtime"}),e.jsx(d,{id:"runtime",value:n.stack.runtime,onChange:t=>i("stack.runtime",t.target.value),placeholder:"node|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"framework",children:"Framework"}),e.jsx(d,{id:"framework",value:n.stack.framework,onChange:t=>i("stack.framework",t.target.value),placeholder:"express|fastify|django|gin|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"language",children:"Language"}),e.jsx(d,{id:"language",value:n.stack.language,onChange:t=>i("stack.language",t.target.value),placeholder:"typescript|javascript|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"database",children:"Database"}),e.jsx(d,{id:"database",value:n.stack.database,onChange:t=>i("stack.database",t.target.value),placeholder:"postgresql|mysql|mongodb|sqlite|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"deployment",children:"Deployment"}),e.jsx(d,{id:"deployment",value:n.stack.deployment,onChange:t=>i("stack.deployment",t.target.value),placeholder:"docker|kubernetes|vercel|aws|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"repository",children:"Repository"}),e.jsx(d,{id:"repository",value:n.stack.repository,onChange:t=>i("stack.repository",t.target.value),placeholder:"https://github.com/yourorg/yourproject"})]})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Quick Commands"})}),e.jsx(p,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"commands",children:"Commands (format: command_name: command_to_run)"}),e.jsx(B,{id:"commands",value:E,onChange:t=>T(t.target.value),placeholder:`install: npm install
|
|
4
4
|
dev: npm run dev
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,r as n,A as v,j as e,t as y,F as k,B as l,M as b,au as w,L as C,Y as E,ar as A}from"./index-
|
|
1
|
+
import{a as g,r as n,A as v,j as e,t as y,F as k,B as l,M as b,au as w,L as C,Y as E,ar as A}from"./index-BCJCpqiX.js";import{C as a,a as c,b as o,c as m}from"./card-BvtnQC9t.js";import{c as D}from"./clipboard-B9ndUJKl.js";function S(){const{toast:h}=g(),[r,x]=n.useState(null),[u,p]=n.useState(!0),[j,i]=n.useState(!1);n.useEffect(()=>{fetch(`${v}/api/v1/context/architecture`).then(t=>{if(t.ok)return t.json();throw new Error("Not found")}).then(t=>{t.success?(x(t.document),i(!0)):i(!1)}).catch(()=>{i(!1)}).finally(()=>{p(!1)})},[]);const N=async()=>{const t=".nut/context/architecture.md";try{await D(t),h({title:"Copied!",description:`Path ${t} copied to clipboard`})}catch(d){console.error("Failed to copy path:",d),h({title:"Error",description:"Failed to copy path to clipboard",variant:"destructive"})}},f=()=>{const t=new CustomEvent("discuss-in-chat",{detail:{type:"context",id:"architecture-md",filename:"architecture.md",name:"architecture.md",path:".nut/context/architecture.md"}});window.dispatchEvent(t)};if(u)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading architecture documentation..."})]})})})});if(!j||!r)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Architecture Documentation Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Architecture documentation will appear here once created."})]})})})});const s=r.metadata;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Technical Architecture"}),e.jsx("p",{className:"text-muted-foreground",children:"System design, components, and technical patterns"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(l,{variant:"outline",size:"sm",onClick:f,children:[e.jsx(b,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Discuss"})]}),e.jsxs(l,{variant:"outline",size:"sm",onClick:N,children:[e.jsx(w,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Copy Path"})]}),e.jsx(l,{size:"sm",asChild:!0,children:e.jsxs(C,{to:"/context/architecture/edit",children:[e.jsx(E,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Edit"})]})})]})]}),s&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Technology Stack"})}),e.jsx(c,{className:"space-y-3",children:s.stack&&e.jsxs("div",{className:"space-y-1 text-sm",children:[s.stack.runtime&&e.jsxs("div",{children:["Runtime: ",s.stack.runtime]}),s.stack.framework&&e.jsxs("div",{children:["Framework: ",s.stack.framework]}),s.stack.language&&e.jsxs("div",{children:["Language: ",s.stack.language]}),s.stack.database&&e.jsxs("div",{children:["Database: ",s.stack.database]}),s.stack.deployment&&e.jsxs("div",{children:["Deployment: ",s.stack.deployment]}),s.stack.repository&&e.jsxs("div",{children:["Repository:"," ",e.jsx("a",{href:s.stack.repository,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:s.stack.repository})]})]})})]}),e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Quick Commands"})}),e.jsx(c,{className:"space-y-3",children:s.commands&&e.jsxs("div",{className:"space-y-1",children:[Object.entries(s.commands).slice(0,5).map(([t,d])=>e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"font-medium capitalize",children:[t,": "]}),e.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:d})]},t)),Object.entries(s.commands).length>5&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["+ ",Object.entries(s.commands).length-5," more commands"]})]})})]})]}),e.jsxs(a,{children:[e.jsx(o,{children:e.jsx(m,{className:"text-lg font-semibold",children:"Architecture Documentation"})}),e.jsx(c,{children:e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx(A,{children:r.content||"No content available"})})})]})]})}export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Y,s as le,r as n,bw as c,j as e,bv as O,i as ce,D as I,V as M,B as l,b as V,d as $,f as H,g as J,I as j,W as z,y as oe,z as de,E as he,H as ue,J as xe,N as me,O as ge,Q as je,R as pe,U as ve,v as r}from"./index-
|
|
1
|
+
import{c as Y,s as le,r as n,bw as c,j as e,bv as O,i as ce,D as I,V as M,B as l,b as V,d as $,f as H,g as J,I as j,W as z,y as oe,z as de,E as he,H as ue,J as xe,N as me,O as ge,Q as je,R as pe,U as ve,v as r}from"./index-BCJCpqiX.js";import{C as p,b as v,c as w,d as f,a as y}from"./card-BvtnQC9t.js";import{L as o}from"./label-DRKhH7ga.js";import{S as _,a as W,b as q,c as B,d as a}from"./select-B-jKKvfS.js";import{S as U}from"./switch-eaA0aAvD.js";import{B as k}from"./badge-CNyAEmE0.js";import{C as we}from"./circle-alert-DizYv0IJ.js";import"./index-BNBmCbpi.js";import"./chevron-up-DytAcGho.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as e,t as x,A as f}from"./index-
|
|
1
|
+
import{r as m,j as e,t as x,A as f}from"./index-BCJCpqiX.js";import{C as w}from"./circle-check-BeNzwcb4.js";import{C as b}from"./circle-x-BRLHtYhj.js";const r="coconut/github-auth-state";function j(s){try{window.opener&&window.opener.postMessage({type:"github-auth",...s},window.location.origin)}catch{}}const v=()=>{const[s,d]=m.useState("pending"),[h,p]=m.useState("Authorizing GitHub…");return m.useEffect(()=>{const a=new URLSearchParams(window.location.search),u=a.get("error"),l=a.get("token"),n=a.get("expires_at")||a.get("expiresAt"),c=a.get("state"),o=t=>{j(t),d(t.success?"success":"error"),p(t.message),setTimeout(()=>{try{window.close()}catch{}},1200)};if(u){localStorage.removeItem(r),o({success:!1,message:decodeURIComponent(u)});return}if(!l||!n||!c){localStorage.removeItem(r),o({success:!1,message:"Missing authorization parameters. Please try again."});return}const g=localStorage.getItem(r);if(!g||g!==c){localStorage.removeItem(r),o({success:!1,message:"Authorization state mismatch. Please start again."});return}(async()=>{try{const t=await fetch(`${f}/api/v1/git/providers/github/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:l,expiresAt:n,state:c})}),i=await t.json();if(!t.ok||!i.success)throw new Error(i?.error?.message||"Failed to store GitHub token");localStorage.removeItem(r),o({success:!0,message:"GitHub connected successfully!",expiresAt:i.data?.expiresAt||n})}catch(t){localStorage.removeItem(r),o({success:!1,message:t?.message||"Failed to store GitHub token. Please try again."})}})()},[]),e.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-6",children:e.jsxs("div",{className:"max-w-sm rounded-lg border bg-card p-6 text-center shadow-sm",children:[e.jsxs("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:[s==="pending"&&e.jsx(x,{className:"h-6 w-6 animate-spin text-muted-foreground"}),s==="success"&&e.jsx(w,{className:"h-6 w-6 text-green-600"}),s==="error"&&e.jsx(b,{className:"h-6 w-6 text-red-600"})]}),e.jsx("h1",{className:"text-lg font-semibold",children:"GitHub Authorization"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:h}),s!=="pending"&&e.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"You can close this window and return to Coconut."})]})})};export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as ce,a as de,r as i,j as e,B as r,T as oe,n as M,X as me,F as xe,Y as he,D as ue,b as fe,d as pe,f as je,k as ge,a2 as B,a3 as R,a4 as H,a5 as L,a6 as O,aa as G,a9 as ve,o as Ne,A as T}from"./index-Dnh3d5dh.js";import{C as g,b as ye,a as _,c as we}from"./card-CxtDjDKY.js";import{B as U}from"./badge-D2aQlcxQ.js";import{u as Se}from"./use-terminal-D6UJQuYa.js";import{T as Ce}from"./terminal-preview-BF6OYmEL.js";import{S as be,a as ke,b as Ae,c as De,d as w}from"./select-DGSoJZ_9.js";import{b as Me,e as Te,d as Ie,c as $e,a as Ee}from"./pipeline-builders-Bkf0wt_O.js";import{R as Pe}from"./refresh-cw-DY5O1wul.js";import{C as ze,a as Fe}from"./chevrons-up-BB0xPeZH.js";import{P as Be}from"./play-B1b-UHj0.js";import{C as Re}from"./code-DOk08pmu.js";import{C as He}from"./chevron-up-CjDDMMJu.js";import"./xterm-DTxiCjtJ.js";import"./index-SImVYpAE.js";const Le=c=>c?Array.isArray(c)?c.filter(x=>typeof x=="string").map(x=>x.trim()).filter(Boolean):typeof c=="string"?c.split(",").map(x=>x.trim()).filter(Boolean):[]:[];function ss(){const c=ce(),{sessions:x,loading:b,error:I,refreshSessions:S,createSession:V,destroySession:K}=Se(),{toast:v}=de(),[$,W]=i.useState([]),[q,X]=i.useState(!0),[j,k]=i.useState(()=>({})),[A,N]=i.useState(!1),[f,Y]=i.useState("claude"),[E,J]=i.useState(""),[D,P]=i.useState(!1),[h,Q]=i.useState([]),[p,y]=i.useState([]),[Z,ee]=i.useState({}),[u,se]=i.useState([]),[o,C]=i.useState([]),te=s=>{const t=Date.now(),a=new Date(s).getTime(),n=Math.max(0,Math.floor((t-a)/1e3));if(n<60)return`${n}s ago`;const d=Math.floor(n/60);if(d<60)return`${d}m ago`;const l=Math.floor(d/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`};i.useEffect(()=>{(async()=>{try{const t=await fetch(`${T}/api/v1/tasks`);if(t.ok){const a=await t.json(),n=a.data||a;W(Array.isArray(n)?n:[])}}catch(t){console.error("Error loading tasks:",t)}finally{X(!1)}})()},[]),i.useEffect(()=>{S()},[S]),i.useEffect(()=>{if(!A)return;(async()=>{try{const t=await fetch(`${T}/api/v1/mcp`);if(t.ok){const a=await t.json();a?.success&&Array.isArray(a.servers)&&(Q(a.servers),y(n=>n.filter(d=>a.servers.includes(d))),a.mcpServers&&typeof a.mcpServers=="object"&&ee(a.mcpServers))}}catch(t){console.error("Failed to load MCP servers",t)}try{const t=await fetch(`${T}/api/v1/skills`);if(t.ok){const a=await t.json(),d=(Array.isArray(a?.documents)?a.documents:[]).map(l=>({id:l.id,name:l?.metadata?.name||l.id,mcpServers:Le(l?.metadata?.metadata?.mcpServers)}));se(d),C(l=>l.filter(F=>d.some(le=>le.id===F)))}}catch(t){console.error("Failed to load skills",t)}})()},[A]),i.useEffect(()=>{o.length!==0&&y(s=>{const t=new Set(s),a=h.length>0?new Set(h):void 0;return o.forEach(n=>{const d=u.find(l=>l.id===n);d&&d.mcpServers.forEach(l=>{(!a||a.has(l))&&t.add(l)})}),Array.from(t)})},[o,u,h]);const m=i.useMemo(()=>x.filter(s=>s.taskId?.startsWith("cp-")||s.taskId?.startsWith("ag-")).sort((s,t)=>new Date(t.lastActivity).getTime()-new Date(s.lastActivity).getTime()),[x]);i.useEffect(()=>{k(s=>{const t={...s};return m.forEach(a=>{a.id in t||(t[a.id]=!0)}),t})},[m]);const z=i.useMemo(()=>$.filter(s=>s.status==="draft"||s.status==="ready").sort((s,t)=>new Date(t.metadata.createdAt).getTime()-new Date(s.metadata.createdAt).getTime()).slice(0,3),[$]),ae=()=>{const s=m.every(a=>j[a.id]),t={};m.forEach(a=>{t[a.id]=!s}),k(t)},ie=m.length>0&&m.every(s=>j[s.id]),ne=async s=>{await K(s)?(v({title:"Session closed",description:s}),setTimeout(()=>S(),100)):v({title:"Failed to close session",description:s,variant:"destructive"})},re=async()=>{P(!0);try{const s=`session-${Date.now()}`,t={taskId:s,contextType:"change-task",cliAgent:f,mcpServersMap:Z,selectedMcpServers:p,skills:u,selectedSkillIds:o,automationEnabled:!1,customInstruction:E.trim(),includeDefaultInstructions:!1};let a="";f==="claude"?a=Me(t):f==="gemini"?a=Te(t):f==="codex"?a=Ie(t):f==="droid"?a=$e(t):f==="kiro"&&(a=Ee(t)),await V(s,a)?(v({title:"Coding session started",description:`Session ${s} created`}),N(!1),c(`/terminal/${s}`)):v({title:"Failed to start session",description:"Could not create terminal session",variant:"destructive"})}catch(s){console.error("Error starting coding session:",s),v({title:"Error",description:"Failed to start coding session",variant:"destructive"})}finally{P(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Agents"}),e.jsx("p",{className:"text-muted-foreground hidden sm:block",children:"Manage agents and their active sessions"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"outline",size:"sm",onClick:()=>S(),disabled:b,children:[e.jsx(Pe,{className:`h-4 w-4 sm:mr-2 ${b?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]}),m.length>0&&e.jsx(r,{variant:"outline",size:"sm",onClick:ae,children:ie?e.jsxs(e.Fragment,{children:[e.jsx(ze,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Hide All"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fe,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Show All"})]})}),e.jsxs(r,{size:"sm",onClick:()=>N(!0),children:[e.jsx(Be,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Interactive Session"})]})]})]}),I&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("div",{className:"text-red-600",children:I})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Sessions"}),b?e.jsx("div",{className:"space-y-2",children:[...Array(2)].map((s,t)=>e.jsx(g,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-4 w-4 rounded bg-muted animate-pulse"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 w-40 bg-muted rounded animate-pulse mb-2"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]})]}),e.jsx("div",{className:"h-6 w-20 bg-muted rounded animate-pulse"})]})},t))}):m.length===0?e.jsx(g,{className:"p-8",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3",children:[e.jsx(Re,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No active sessions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Get started by launching an"," ",e.jsx("button",{onClick:()=>N(!0),className:"text-primary hover:underline font-medium",children:"Interactive Session"})," ","or working on a"," ",e.jsx("button",{onClick:()=>c("/tasks"),className:"text-primary hover:underline font-medium",children:"New Task"})]})]})]})}):e.jsx("div",{className:"space-y-2",children:m.slice(0,10).map(s=>e.jsxs(g,{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(oe,{className:"h-4 w-4 shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-sm",children:s.taskId}),e.jsxs("div",{className:"text-xs text-gray-500",children:["Session ",s.id.split("-").slice(-1)[0].substring(0,8)," • Last activity ",te(s.lastActivity)]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("div",{className:`flex items-center gap-1 ${s.connected?"text-green-600":"text-gray-400"}`,title:s.connected?"Connected":"Disconnected",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${s.connected?"bg-green-500":"bg-gray-400"}`})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>{k(t=>({...t,[s.id]:!t[s.id]}))},"aria-label":j[s.id]?"Hide preview":"Show preview",title:j[s.id]?"Hide preview":"Show preview",children:j[s.id]?e.jsx(He,{className:"h-4 w-4"}):e.jsx(M,{className:"h-4 w-4"})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>c(`/terminal/${s.taskId}`),children:"Open"}),e.jsx(r,{size:"icon",variant:"destructive",onClick:()=>ne(s.id),title:"Close session","aria-label":"Close session",children:e.jsx(me,{className:"h-4 w-4"})})]})]}),j[s.id]&&e.jsx("div",{className:"mt-2 w-full p-2 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>c(`/terminal/${s.taskId}`),title:"Click to open full terminal session",children:e.jsx(Ce,{sessionId:s.id,heightPx:160,maxScrollback:200})})]},s.id))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"New Tasks"}),q?e.jsx("div",{className:"space-y-3",children:[...Array(3)].map((s,t)=>e.jsx(g,{children:e.jsx(ye,{className:"py-3",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-2/3 animate-pulse"}),e.jsx("div",{className:"h-3 bg-muted rounded w-1/3 animate-pulse"})]}),e.jsx("div",{className:"h-5 bg-muted rounded w-16 animate-pulse"})]})})},t))}):z.length===0?e.jsx(g,{children:e.jsx(_,{className:"flex items-center justify-center py-6",children:e.jsx("div",{className:"text-center text-sm text-gray-500",children:"No draft or approved tasks found"})})}):e.jsx("div",{className:"space-y-2",children:z.map(s=>e.jsx(g,{className:"hover:shadow-md transition-all cursor-pointer hover:border-primary/50",onClick:()=>c(`/terminal/${s.id}`),children:e.jsx(_,{className:"py-4",children:e.jsx("div",{className:"flex justify-between items-start gap-4",children:e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx(we,{className:"text-base leading-tight",children:s.title||s.intent}),e.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[s.priority&&e.jsx(U,{variant:s.priority==="high"||s.priority==="critical"?"destructive":s.priority==="medium"?"secondary":"outline",className:"text-xs",children:s.priority}),e.jsx(U,{variant:"default",className:"text-xs",children:s.status})]})]}),s.content&&e.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[s.content.split(`
|
|
1
|
+
import{u as ce,a as de,r as i,j as e,B as r,T as oe,n as M,X as me,F as xe,Y as he,D as ue,b as fe,d as pe,f as je,k as ge,a2 as B,a3 as R,a4 as H,a5 as L,a6 as O,aa as G,a9 as ve,o as Ne,A as T}from"./index-BCJCpqiX.js";import{C as g,b as ye,a as _,c as we}from"./card-BvtnQC9t.js";import{B as U}from"./badge-CNyAEmE0.js";import{u as Se}from"./use-terminal-B2c7rWHu.js";import{T as Ce}from"./terminal-preview-COD7icw5.js";import{S as be,a as ke,b as Ae,c as De,d as w}from"./select-B-jKKvfS.js";import{b as Me,e as Te,d as Ie,c as $e,a as Ee}from"./pipeline-builders-Bkf0wt_O.js";import{R as Pe}from"./refresh-cw-BzAty17h.js";import{C as ze,a as Fe}from"./chevrons-up-BuCS2RR5.js";import{P as Be}from"./play-3wS9bypH.js";import{C as Re}from"./code-ClRsBG4Z.js";import{C as He}from"./chevron-up-DytAcGho.js";import"./xterm-DTxiCjtJ.js";import"./index-BNBmCbpi.js";const Le=c=>c?Array.isArray(c)?c.filter(x=>typeof x=="string").map(x=>x.trim()).filter(Boolean):typeof c=="string"?c.split(",").map(x=>x.trim()).filter(Boolean):[]:[];function ss(){const c=ce(),{sessions:x,loading:b,error:I,refreshSessions:S,createSession:V,destroySession:K}=Se(),{toast:v}=de(),[$,W]=i.useState([]),[q,X]=i.useState(!0),[j,k]=i.useState(()=>({})),[A,N]=i.useState(!1),[f,Y]=i.useState("claude"),[E,J]=i.useState(""),[D,P]=i.useState(!1),[h,Q]=i.useState([]),[p,y]=i.useState([]),[Z,ee]=i.useState({}),[u,se]=i.useState([]),[o,C]=i.useState([]),te=s=>{const t=Date.now(),a=new Date(s).getTime(),n=Math.max(0,Math.floor((t-a)/1e3));if(n<60)return`${n}s ago`;const d=Math.floor(n/60);if(d<60)return`${d}m ago`;const l=Math.floor(d/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`};i.useEffect(()=>{(async()=>{try{const t=await fetch(`${T}/api/v1/tasks`);if(t.ok){const a=await t.json(),n=a.data||a;W(Array.isArray(n)?n:[])}}catch(t){console.error("Error loading tasks:",t)}finally{X(!1)}})()},[]),i.useEffect(()=>{S()},[S]),i.useEffect(()=>{if(!A)return;(async()=>{try{const t=await fetch(`${T}/api/v1/mcp`);if(t.ok){const a=await t.json();a?.success&&Array.isArray(a.servers)&&(Q(a.servers),y(n=>n.filter(d=>a.servers.includes(d))),a.mcpServers&&typeof a.mcpServers=="object"&&ee(a.mcpServers))}}catch(t){console.error("Failed to load MCP servers",t)}try{const t=await fetch(`${T}/api/v1/skills`);if(t.ok){const a=await t.json(),d=(Array.isArray(a?.documents)?a.documents:[]).map(l=>({id:l.id,name:l?.metadata?.name||l.id,mcpServers:Le(l?.metadata?.metadata?.mcpServers)}));se(d),C(l=>l.filter(F=>d.some(le=>le.id===F)))}}catch(t){console.error("Failed to load skills",t)}})()},[A]),i.useEffect(()=>{o.length!==0&&y(s=>{const t=new Set(s),a=h.length>0?new Set(h):void 0;return o.forEach(n=>{const d=u.find(l=>l.id===n);d&&d.mcpServers.forEach(l=>{(!a||a.has(l))&&t.add(l)})}),Array.from(t)})},[o,u,h]);const m=i.useMemo(()=>x.filter(s=>s.taskId?.startsWith("cp-")||s.taskId?.startsWith("ag-")).sort((s,t)=>new Date(t.lastActivity).getTime()-new Date(s.lastActivity).getTime()),[x]);i.useEffect(()=>{k(s=>{const t={...s};return m.forEach(a=>{a.id in t||(t[a.id]=!0)}),t})},[m]);const z=i.useMemo(()=>$.filter(s=>s.status==="draft"||s.status==="ready").sort((s,t)=>new Date(t.metadata.createdAt).getTime()-new Date(s.metadata.createdAt).getTime()).slice(0,3),[$]),ae=()=>{const s=m.every(a=>j[a.id]),t={};m.forEach(a=>{t[a.id]=!s}),k(t)},ie=m.length>0&&m.every(s=>j[s.id]),ne=async s=>{await K(s)?(v({title:"Session closed",description:s}),setTimeout(()=>S(),100)):v({title:"Failed to close session",description:s,variant:"destructive"})},re=async()=>{P(!0);try{const s=`session-${Date.now()}`,t={taskId:s,contextType:"change-task",cliAgent:f,mcpServersMap:Z,selectedMcpServers:p,skills:u,selectedSkillIds:o,automationEnabled:!1,customInstruction:E.trim(),includeDefaultInstructions:!1};let a="";f==="claude"?a=Me(t):f==="gemini"?a=Te(t):f==="codex"?a=Ie(t):f==="droid"?a=$e(t):f==="kiro"&&(a=Ee(t)),await V(s,a)?(v({title:"Coding session started",description:`Session ${s} created`}),N(!1),c(`/terminal/${s}`)):v({title:"Failed to start session",description:"Could not create terminal session",variant:"destructive"})}catch(s){console.error("Error starting coding session:",s),v({title:"Error",description:"Failed to start coding session",variant:"destructive"})}finally{P(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Agents"}),e.jsx("p",{className:"text-muted-foreground hidden sm:block",children:"Manage agents and their active sessions"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"outline",size:"sm",onClick:()=>S(),disabled:b,children:[e.jsx(Pe,{className:`h-4 w-4 sm:mr-2 ${b?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]}),m.length>0&&e.jsx(r,{variant:"outline",size:"sm",onClick:ae,children:ie?e.jsxs(e.Fragment,{children:[e.jsx(ze,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Hide All"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fe,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Show All"})]})}),e.jsxs(r,{size:"sm",onClick:()=>N(!0),children:[e.jsx(Be,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Interactive Session"})]})]})]}),I&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("div",{className:"text-red-600",children:I})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Sessions"}),b?e.jsx("div",{className:"space-y-2",children:[...Array(2)].map((s,t)=>e.jsx(g,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-4 w-4 rounded bg-muted animate-pulse"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 w-40 bg-muted rounded animate-pulse mb-2"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]})]}),e.jsx("div",{className:"h-6 w-20 bg-muted rounded animate-pulse"})]})},t))}):m.length===0?e.jsx(g,{className:"p-8",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3",children:[e.jsx(Re,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No active sessions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Get started by launching an"," ",e.jsx("button",{onClick:()=>N(!0),className:"text-primary hover:underline font-medium",children:"Interactive Session"})," ","or working on a"," ",e.jsx("button",{onClick:()=>c("/tasks"),className:"text-primary hover:underline font-medium",children:"New Task"})]})]})]})}):e.jsx("div",{className:"space-y-2",children:m.slice(0,10).map(s=>e.jsxs(g,{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(oe,{className:"h-4 w-4 shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-sm",children:s.taskId}),e.jsxs("div",{className:"text-xs text-gray-500",children:["Session ",s.id.split("-").slice(-1)[0].substring(0,8)," • Last activity ",te(s.lastActivity)]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("div",{className:`flex items-center gap-1 ${s.connected?"text-green-600":"text-gray-400"}`,title:s.connected?"Connected":"Disconnected",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${s.connected?"bg-green-500":"bg-gray-400"}`})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>{k(t=>({...t,[s.id]:!t[s.id]}))},"aria-label":j[s.id]?"Hide preview":"Show preview",title:j[s.id]?"Hide preview":"Show preview",children:j[s.id]?e.jsx(He,{className:"h-4 w-4"}):e.jsx(M,{className:"h-4 w-4"})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>c(`/terminal/${s.taskId}`),children:"Open"}),e.jsx(r,{size:"icon",variant:"destructive",onClick:()=>ne(s.id),title:"Close session","aria-label":"Close session",children:e.jsx(me,{className:"h-4 w-4"})})]})]}),j[s.id]&&e.jsx("div",{className:"mt-2 w-full p-2 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>c(`/terminal/${s.taskId}`),title:"Click to open full terminal session",children:e.jsx(Ce,{sessionId:s.id,heightPx:160,maxScrollback:200})})]},s.id))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"New Tasks"}),q?e.jsx("div",{className:"space-y-3",children:[...Array(3)].map((s,t)=>e.jsx(g,{children:e.jsx(ye,{className:"py-3",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-2/3 animate-pulse"}),e.jsx("div",{className:"h-3 bg-muted rounded w-1/3 animate-pulse"})]}),e.jsx("div",{className:"h-5 bg-muted rounded w-16 animate-pulse"})]})})},t))}):z.length===0?e.jsx(g,{children:e.jsx(_,{className:"flex items-center justify-center py-6",children:e.jsx("div",{className:"text-center text-sm text-gray-500",children:"No draft or approved tasks found"})})}):e.jsx("div",{className:"space-y-2",children:z.map(s=>e.jsx(g,{className:"hover:shadow-md transition-all cursor-pointer hover:border-primary/50",onClick:()=>c(`/terminal/${s.id}`),children:e.jsx(_,{className:"py-4",children:e.jsx("div",{className:"flex justify-between items-start gap-4",children:e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx(we,{className:"text-base leading-tight",children:s.title||s.intent}),e.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[s.priority&&e.jsx(U,{variant:s.priority==="high"||s.priority==="critical"?"destructive":s.priority==="medium"?"secondary":"outline",className:"text-xs",children:s.priority}),e.jsx(U,{variant:"default",className:"text-xs",children:s.status})]})]}),s.content&&e.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[s.content.split(`
|
|
2
2
|
`).slice(0,2).join(" ").substring(0,150),s.content.length>150?"...":""]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:[s.id," • by ",s.author.name," • ",new Date(s.metadata.createdAt).toLocaleDateString()]}),e.jsxs("div",{className:"flex gap-2",onClick:t=>t.stopPropagation(),children:[e.jsxs(r,{variant:"ghost",size:"sm",onClick:()=>c(`/tasks/${s.id}`),className:"h-7 px-2 text-xs",children:[e.jsx(xe,{className:"h-3 w-3 mr-1"})," View"]}),e.jsxs(r,{variant:"ghost",size:"sm",onClick:()=>c(`/tasks/${s.id}/edit`),className:"h-7 px-2 text-xs",children:[e.jsx(he,{className:"h-3 w-3 mr-1"})," Edit"]})]})]})]})})})},s.id))})]}),e.jsx(ue,{open:A,onOpenChange:N,children:e.jsxs(fe,{className:"max-w-lg",children:[e.jsxs(pe,{children:[e.jsx(je,{children:"Start Agent"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Start an interactive session"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Agent"}),e.jsxs(be,{value:f,onValueChange:s=>Y(s),children:[e.jsx(ke,{className:"w-full",children:e.jsx(Ae,{placeholder:"Select coding agent"})}),e.jsxs(De,{children:[e.jsx(w,{value:"claude",children:"Claude Code"}),e.jsx(w,{value:"gemini",children:"Google Gemini"}),e.jsx(w,{value:"codex",children:"OpenAI Codex"}),e.jsx(w,{value:"droid",children:"Factory Droid"}),e.jsx(w,{value:"kiro",children:"Kiro"})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(ge,{className:"h-4 w-4"}),"Skills"]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[o.length," of ",u.length," selected"]})]}),e.jsxs(B,{children:[e.jsx(R,{asChild:!0,children:e.jsxs(r,{variant:"outline",className:"w-full justify-between",children:[o.length===0?"Select skills...":o.length===u.length?"All skills selected":`${o.length} skill${o.length!==1?"s":""} selected`,e.jsx(M,{className:"h-4 w-4 opacity-50"})]})}),e.jsxs(H,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[e.jsxs(L,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Available Skills"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),C(u.map(t=>t.id))},children:"All"}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),C([])},children:"None"})]})]}),e.jsx(O,{}),u.length===0?e.jsx("div",{className:"px-2 py-1.5 text-sm text-gray-500",children:"No skills found"}):u.map(s=>e.jsx(G,{checked:o.includes(s.id),onCheckedChange:t=>{C(a=>t?a.includes(s.id)?a:[...a,s.id]:a.filter(n=>n!==s.id))},children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{children:s.name}),s.mcpServers.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["MCP servers: ",s.mcpServers.join(", ")]}),s.mcpServers.length===0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Inherits available MCP servers"})]})},s.id))]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4"}),"MCP Servers"]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[p.length," of ",h.length," selected"]})]}),e.jsxs(B,{children:[e.jsx(R,{asChild:!0,children:e.jsxs(r,{variant:"outline",className:"w-full justify-between",children:[p.length===0?"Select MCP servers...":p.length===h.length?"All servers selected":`${p.length} server${p.length!==1?"s":""} selected`,e.jsx(M,{className:"h-4 w-4 opacity-50"})]})}),e.jsxs(H,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[e.jsxs(L,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Available Servers"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),y(h)},children:"All"}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),y([])},children:"None"})]})]}),e.jsx(O,{}),h.length===0?e.jsx("div",{className:"px-2 py-1.5 text-sm text-gray-500",children:"No MCP servers found"}):h.map(s=>e.jsx(G,{checked:p.includes(s),onCheckedChange:t=>{y(a=>t?a.includes(s)?a:[...a,s]:a.filter(n=>n!==s))},children:s},s))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Additional Instructions (optional)"}),e.jsx(Ne,{value:E,onChange:s=>J(s.target.value),placeholder:"Add any custom instructions for the coding agent...",rows:4,className:"resize-none"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(r,{variant:"outline",onClick:()=>N(!1),disabled:D,children:"Cancel"}),e.jsx(r,{onClick:re,disabled:D,children:D?"Starting...":"Start Session"})]})]})]})})]})}export{ss as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e,e as a,n as m}from"./index-
|
|
1
|
+
import{r as x,j as e,e as a,n as m}from"./index-BCJCpqiX.js";function u({title:n,description:t,icon:r,defaultOpen:o=!1,children:i,className:l}){const[s,d]=x.useState(o);return e.jsxs("div",{className:a("rounded-lg border bg-card text-card-foreground",l),children:[e.jsxs("button",{type:"button",onClick:()=>d(c=>!c),className:"flex w-full items-center justify-between gap-4 px-4 py-3 text-left","aria-expanded":s,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[r,e.jsxs("div",{children:[e.jsx("p",{className:"font-medium leading-tight",children:n}),t&&e.jsx("p",{className:"text-sm text-muted-foreground leading-snug",children:t})]})]}),e.jsx(m,{className:a("h-4 w-4 shrink-0 transition-transform duration-200",s?"rotate-180":"rotate-0")})]}),s&&e.jsx("div",{className:"border-t px-4 py-4",children:i})]})}export{u as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as y,u as Re,a as Le,r as l,j as e,D as De,b as _e,d as te,e as f,f as ae,g as ne,S as re,B as d,C as le,I as B,h as G,i as qe,G as Ie,F as Pe,k as ue,Z as ze,l as We,m as Fe,T as ce,n as Ve,o as Be,L as N,P as Ee,M as $e,K as A,p as g,A as Ke}from"./index-
|
|
1
|
+
import{c as y,u as Re,a as Le,r as l,j as e,D as De,b as _e,d as te,e as f,f as ae,g as ne,S as re,B as d,C as le,I as B,h as G,i as qe,G as Ie,F as Pe,k as ue,Z as ze,l as We,m as Fe,T as ce,n as Ve,o as Be,L as N,P as Ee,M as $e,K as A,p as g,A as Ke}from"./index-BCJCpqiX.js";import{C as x,a as u,b as R,c as L,d as ie}from"./card-BvtnQC9t.js";import{B as Ge}from"./badge-CNyAEmE0.js";import{g as He}from"./status-utils-PwF3DXLL.js";import{L as Oe}from"./label-DRKhH7ga.js";import{S as oe,a as de,b as me,c as he,d as E}from"./select-B-jKKvfS.js";import{u as Ye}from"./use-terminal-B2c7rWHu.js";import{T as Qe}from"./terminal-preview-COD7icw5.js";import{C as Ue}from"./circle-check-BeNzwcb4.js";import{C as Ze}from"./chevron-left-DX764A0x.js";import{S as Je}from"./search-JZd6JxnR.js";import{C as Xe}from"./code-ClRsBG4Z.js";import{F as es}from"./folder-git-2-DalKErlr.js";import{E as ss}from"./external-link-CTmfnP6Q.js";import{P as ts}from"./play-3wS9bypH.js";import{C as as}from"./clock-CNttSfN6.js";import{C as ns}from"./circle-check-big-DEZcW9-c.js";import"./index-BNBmCbpi.js";import"./chevron-up-DytAcGho.js";import"./xterm-DTxiCjtJ.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as le,A as l,bF as ws,r as n,a as vs,ad as ys,j as e,L as ee,l as $e,B as o,G as D,ab as Ns,X as Cs,I as k,n as Me,E as Be,D as se,b as te,d as ae,f as re,g as ne,bx as ks,W as Oe}from"./index-
|
|
1
|
+
import{c as le,A as l,bF as ws,r as n,a as vs,ad as ys,j as e,L as ee,l as $e,B as o,G as D,ab as Ns,X as Cs,I as k,n as Me,E as Be,D as se,b as te,d as ae,f as re,g as ne,bx as ks,W as Oe}from"./index-BCJCpqiX.js";import{C as ie}from"./card-BvtnQC9t.js";import{L as Re}from"./label-DRKhH7ga.js";import{T as Ss,a as Ps,b as Ge,c as We}from"./tabs-DWgE2aSE.js";import{C as Ts}from"./circle-check-BeNzwcb4.js";import{C as As}from"./circle-x-BRLHtYhj.js";import{A as Ds}from"./arrow-down-BF7Abk86.js";import{A as Es}from"./arrow-up-9fnGGmZL.js";import{R as ze}from"./refresh-cw-BzAty17h.js";import{C as ce}from"./circle-alert-DizYv0IJ.js";import{C as Ue}from"./chevron-up-DytAcGho.js";import{F as oe}from"./folder-git-2-DalKErlr.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Te,r,a as He,A as u,j as e,bv as he,B as o,E as Fe,t as De,bx as ze,I as U,D as W,b as B,d as q,f as J,g as K,W as Y}from"./index-
|
|
1
|
+
import{c as Te,r,a as He,A as u,j as e,bv as he,B as o,E as Fe,t as De,bx as ze,I as U,D as W,b as B,d as q,f as J,g as K,W as Y}from"./index-BCJCpqiX.js";import{C as xe,b as pe,c as ge,d as fe,a as be}from"./card-BvtnQC9t.js";import{L as f}from"./label-DRKhH7ga.js";import{R as Me,a as je}from"./radio-group-DHicQy_R.js";import{R as A}from"./refresh-cw-BzAty17h.js";import{E as ve}from"./external-link-CTmfnP6Q.js";import{C as Oe}from"./circle-check-BeNzwcb4.js";import{C as Ie}from"./circle-x-BRLHtYhj.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ge,a as ve,r as u,j as e,t as se,B as x,a0 as fe,$ as Ne,bt as be,i as Te,Z as Ce,bu as Se,I as c,o as O,ab as ae,P as E,bv as ne,E as we,A as ie}from"./index-
|
|
1
|
+
import{c as ge,a as ve,r as u,j as e,t as se,B as x,a0 as fe,$ as Ne,bt as be,i as Te,Z as Ce,bu as Se,I as c,o as O,ab as ae,P as E,bv as ne,E as we,A as ie}from"./index-BCJCpqiX.js";import{C as y,b as j,c as g,d as v,a as f,e as Ae}from"./card-BvtnQC9t.js";import{L as o}from"./label-DRKhH7ga.js";import{B as re}from"./badge-CNyAEmE0.js";import{S as ke,a as Ie,b as Oe,c as Fe,d as Pe}from"./select-B-jKKvfS.js";import{A as Ee,a as Me}from"./alert-BMUNUSMK.js";import{T as De,a as Le,b as C,c as S}from"./tabs-DWgE2aSE.js";import{E as Ue}from"./eye-oaenIcQg.js";import{C as _e,a as Re}from"./clipboard-CRczIbtb.js";import"./index-BNBmCbpi.js";import"./chevron-up-DytAcGho.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as u,j as e,e as p,B as c,E as x,I as j,P as v}from"./index-
|
|
1
|
+
import{c as u,j as e,e as p,B as c,E as x,I as j,P as v}from"./index-BCJCpqiX.js";import{L as r}from"./label-DRKhH7ga.js";import{S,a as y,b,c as f,d as k}from"./select-B-jKKvfS.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|