openfox 1.6.13 → 1.6.14
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/{ask-JQQNGB5K.js → ask-3RK5YJZE.js} +2 -2
- package/dist/{auto-compaction-QPFQEWJG.js → auto-compaction-C4PMBB24.js} +5 -5
- package/dist/{chat-handler-FDHHTHS3.js → chat-handler-US3QOOE4.js} +7 -7
- package/dist/{chunk-5LDTVERY.js → chunk-22CTURMH.js} +1 -3
- package/dist/{chunk-7T2CA2C6.js → chunk-3JU6H6A4.js} +31 -31
- package/dist/{chunk-E6FCNB3B.js → chunk-3XZ23PXM.js} +4 -6
- package/dist/{chunk-ZRDRYL6W.js → chunk-5GE3QJSZ.js} +2 -2
- package/dist/{chunk-WQ4W5H6A.js → chunk-7HLRI6JM.js} +6 -5
- package/dist/{chunk-LMIBGLOB.js → chunk-H22VHHQ4.js} +4 -4
- package/dist/{chunk-TXQNRBMZ.js → chunk-J2DHVXRX.js} +2 -2
- package/dist/{chunk-POJO7A5H.js → chunk-N25QUEPO.js} +8 -10
- package/dist/{chunk-ZHGP4PBJ.js → chunk-OOIRCXAY.js} +2 -2
- package/dist/{chunk-HCZT5BDI.js → chunk-PCOG5FQD.js} +6 -6
- package/dist/{chunk-AKFLBPPY.js → chunk-UL4JYQKK.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{config-TUA644W4.js → config-DEM6ASQM.js} +4 -4
- package/dist/{events-EILPWKYE.js → events-VDAC7E7K.js} +3 -3
- package/dist/{folding-NZYOXNKK.js → folding-NDFQCISZ.js} +2 -2
- package/dist/{orchestrator-YKQJI3PH.js → orchestrator-KZI7B5IS.js} +6 -6
- package/dist/package.json +2 -1
- package/dist/{processor-JU7MSV4F.js → processor-KBSF2HFD.js} +4 -4
- package/dist/{provider-FNSGWDIW.js → provider-K3PHZO27.js} +6 -6
- package/dist/{serve-O62TKFVA.js → serve-DERN4AB6.js} +11 -11
- package/dist/server/index.js +9 -9
- package/dist/{tools-JWAF3MAR.js → tools-PLVK22CF.js} +5 -5
- package/dist/{vision-fallback-BWCKA2FZ.js → vision-fallback-NOC3YYIB.js} +2 -2
- package/dist/web/assets/{index-Cp8gfbgP.js → index-Ccy2Csbl.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +2 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
cancelQuestionsForSession,
|
|
7
7
|
hasPendingQuestion,
|
|
8
8
|
provideAnswer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-22CTURMH.js";
|
|
10
10
|
export {
|
|
11
11
|
AskUserInterrupt,
|
|
12
12
|
askUserTool,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
hasPendingQuestion,
|
|
17
17
|
provideAnswer
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=ask-
|
|
19
|
+
//# sourceMappingURL=ask-3RK5YJZE.js.map
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-N25QUEPO.js";
|
|
6
6
|
import "./chunk-NBU6KIOD.js";
|
|
7
7
|
import "./chunk-574HZVLE.js";
|
|
8
8
|
import "./chunk-XFXOSPYH.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5GE3QJSZ.js";
|
|
10
|
+
import "./chunk-7HLRI6JM.js";
|
|
11
11
|
import "./chunk-NJWPSSRW.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-22CTURMH.js";
|
|
13
13
|
import "./chunk-7IOZFJBW.js";
|
|
14
14
|
import "./chunk-XKFPU2FA.js";
|
|
15
15
|
import "./chunk-3EHGGBWE.js";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
performManualContextCompaction,
|
|
23
23
|
resolveCompactionStatsIdentity
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=auto-compaction-
|
|
25
|
+
//# sourceMappingURL=auto-compaction-C4PMBB24.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-QDEKU5RL.js";
|
|
5
5
|
import {
|
|
6
6
|
runChatTurn
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-H22VHHQ4.js";
|
|
8
|
+
import "./chunk-N25QUEPO.js";
|
|
9
9
|
import "./chunk-NBU6KIOD.js";
|
|
10
10
|
import "./chunk-574HZVLE.js";
|
|
11
11
|
import "./chunk-XFXOSPYH.js";
|
|
12
12
|
import {
|
|
13
13
|
getEventStore,
|
|
14
14
|
updateSessionMetadata
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
16
16
|
import {
|
|
17
17
|
buildMessagesFromStoredEvents,
|
|
18
18
|
foldPendingConfirmations
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7HLRI6JM.js";
|
|
20
20
|
import {
|
|
21
21
|
createChatMessageMessage,
|
|
22
22
|
createContextStateMessage,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
createSessionRunningMessage,
|
|
25
25
|
createSessionStateMessage
|
|
26
26
|
} from "./chunk-NJWPSSRW.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-22CTURMH.js";
|
|
28
28
|
import "./chunk-7IOZFJBW.js";
|
|
29
29
|
import "./chunk-XKFPU2FA.js";
|
|
30
30
|
import "./chunk-3EHGGBWE.js";
|
|
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
61
61
|
sessionManager.setRunning(sessionId, true);
|
|
62
62
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
63
63
|
try {
|
|
64
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
64
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-C4PMBB24.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -200,4 +200,4 @@ export {
|
|
|
200
200
|
startChatSession,
|
|
201
201
|
stopSessionExecution
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=chat-handler-
|
|
203
|
+
//# sourceMappingURL=chat-handler-US3QOOE4.js.map
|
|
@@ -76,8 +76,6 @@ var AskUserInterrupt = class extends Error {
|
|
|
76
76
|
this.question = question;
|
|
77
77
|
this.name = "AskUserInterrupt";
|
|
78
78
|
}
|
|
79
|
-
callId;
|
|
80
|
-
question;
|
|
81
79
|
};
|
|
82
80
|
function provideAnswer(callId, answer) {
|
|
83
81
|
const pending = pendingQuestions.get(callId);
|
|
@@ -127,4 +125,4 @@ export {
|
|
|
127
125
|
hasPendingQuestion,
|
|
128
126
|
awaitAnswer
|
|
129
127
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-22CTURMH.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createVerifierNudgeConfig,
|
|
7
7
|
runBuilderTurn,
|
|
8
8
|
runChatTurn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H22VHHQ4.js";
|
|
10
10
|
import {
|
|
11
11
|
TurnMetrics,
|
|
12
12
|
agentExists,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
saveSkill,
|
|
45
45
|
setSkillEnabled,
|
|
46
46
|
skillExists
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-N25QUEPO.js";
|
|
48
48
|
import {
|
|
49
49
|
getPathSeparator,
|
|
50
50
|
getPlatformShell,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
createProviderManager,
|
|
56
56
|
parseDefaultModelSelection
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-OOIRCXAY.js";
|
|
58
58
|
import {
|
|
59
59
|
SessionNotFoundError,
|
|
60
60
|
createLLMClient,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
getBackendDisplayName,
|
|
64
64
|
getLlmStatus,
|
|
65
65
|
getModelProfile
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-3XZ23PXM.js";
|
|
67
67
|
import {
|
|
68
68
|
createSession,
|
|
69
69
|
deleteSession,
|
|
@@ -89,12 +89,12 @@ import {
|
|
|
89
89
|
updateSessionProvider,
|
|
90
90
|
updateSessionRunning,
|
|
91
91
|
updateSessionSummary
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
93
93
|
import {
|
|
94
94
|
buildContextMessagesFromEventHistory,
|
|
95
95
|
buildMessagesFromStoredEvents,
|
|
96
96
|
foldPendingConfirmations
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-7HLRI6JM.js";
|
|
98
98
|
import {
|
|
99
99
|
createChatErrorMessage,
|
|
100
100
|
createChatMessageMessage,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
EventEmitter,
|
|
116
116
|
cancelQuestionsForSession,
|
|
117
117
|
provideAnswer
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-22CTURMH.js";
|
|
119
119
|
import {
|
|
120
120
|
getProject
|
|
121
121
|
} from "./chunk-XKFPU2FA.js";
|
|
@@ -5544,7 +5544,7 @@ function createTerminalRoutes() {
|
|
|
5544
5544
|
}
|
|
5545
5545
|
|
|
5546
5546
|
// src/constants.ts
|
|
5547
|
-
var VERSION = "1.6.
|
|
5547
|
+
var VERSION = "1.6.14";
|
|
5548
5548
|
|
|
5549
5549
|
// src/server/index.ts
|
|
5550
5550
|
var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
|
|
@@ -5709,7 +5709,7 @@ async function createServerHandle(config) {
|
|
|
5709
5709
|
res.json({ success: true });
|
|
5710
5710
|
});
|
|
5711
5711
|
app.get("/api/sessions", async (req, res) => {
|
|
5712
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5712
|
+
const { getRecentUserPromptsForSession } = await import("./events-VDAC7E7K.js");
|
|
5713
5713
|
const projectId = req.query["projectId"];
|
|
5714
5714
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5715
5715
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5742,8 +5742,8 @@ async function createServerHandle(config) {
|
|
|
5742
5742
|
res.status(201).json({ session });
|
|
5743
5743
|
});
|
|
5744
5744
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5745
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5746
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5745
|
+
const { getEventStore: getEventStore2 } = await import("./events-VDAC7E7K.js");
|
|
5746
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NDFQCISZ.js");
|
|
5747
5747
|
const session = sessionManager.getSession(req.params.id);
|
|
5748
5748
|
if (!session) {
|
|
5749
5749
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5773,8 +5773,8 @@ async function createServerHandle(config) {
|
|
|
5773
5773
|
res.json({ success: true });
|
|
5774
5774
|
});
|
|
5775
5775
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5776
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5777
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5776
|
+
const { getEventStore: getEventStore2 } = await import("./events-VDAC7E7K.js");
|
|
5777
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NDFQCISZ.js");
|
|
5778
5778
|
const sessionId = req.params.id;
|
|
5779
5779
|
const session = sessionManager.getSession(sessionId);
|
|
5780
5780
|
if (!session) {
|
|
@@ -5785,7 +5785,7 @@ async function createServerHandle(config) {
|
|
|
5785
5785
|
return res.status(400).json({ error: "providerId is required" });
|
|
5786
5786
|
}
|
|
5787
5787
|
sessionManager.setSessionProvider(sessionId, providerId, model ?? "auto");
|
|
5788
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
5788
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-DEM6ASQM.js");
|
|
5789
5789
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5790
5790
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model ?? "auto");
|
|
5791
5791
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -5811,8 +5811,8 @@ async function createServerHandle(config) {
|
|
|
5811
5811
|
res.json({ success: true });
|
|
5812
5812
|
});
|
|
5813
5813
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5814
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5815
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5814
|
+
const { getEventStore: getEventStore2 } = await import("./events-VDAC7E7K.js");
|
|
5815
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NDFQCISZ.js");
|
|
5816
5816
|
const sessionId = req.params.id;
|
|
5817
5817
|
const session = sessionManager.getSession(sessionId);
|
|
5818
5818
|
if (!session) {
|
|
@@ -5850,13 +5850,13 @@ async function createServerHandle(config) {
|
|
|
5850
5850
|
if (!callId || approved === void 0) {
|
|
5851
5851
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5852
5852
|
}
|
|
5853
|
-
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-
|
|
5853
|
+
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-PLVK22CF.js");
|
|
5854
5854
|
const result = providePathConfirmation2(callId, approved, alwaysAllow);
|
|
5855
5855
|
if (!result.found) {
|
|
5856
5856
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5857
5857
|
}
|
|
5858
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5859
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-
|
|
5858
|
+
const { getEventStore: getEventStore2 } = await import("./events-VDAC7E7K.js");
|
|
5859
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-NDFQCISZ.js");
|
|
5860
5860
|
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-KUKFSV5U.js");
|
|
5861
5861
|
const eventStore = getEventStore2();
|
|
5862
5862
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -5875,7 +5875,7 @@ async function createServerHandle(config) {
|
|
|
5875
5875
|
if (!callId || !answer) {
|
|
5876
5876
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
5877
5877
|
}
|
|
5878
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
5878
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-PLVK22CF.js");
|
|
5879
5879
|
const found = provideAnswer2(callId, answer);
|
|
5880
5880
|
if (!found) {
|
|
5881
5881
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5911,14 +5911,14 @@ async function createServerHandle(config) {
|
|
|
5911
5911
|
if (!session) {
|
|
5912
5912
|
return res.status(404).json({ error: "Session not found" });
|
|
5913
5913
|
}
|
|
5914
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5915
|
-
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-
|
|
5914
|
+
const { stopSessionExecution } = await import("./chat-handler-US3QOOE4.js");
|
|
5915
|
+
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-PLVK22CF.js");
|
|
5916
5916
|
stopSessionExecution(sessionId, sessionManager);
|
|
5917
5917
|
abortSession(sessionId);
|
|
5918
5918
|
cancelQuestionsForSession2(sessionId, "Session stopped by user");
|
|
5919
5919
|
cancelPathConfirmationsForSession2(sessionId, "Session stopped by user");
|
|
5920
5920
|
sessionManager.clearMessageQueue(sessionId);
|
|
5921
|
-
const eventStore = (await import("./events-
|
|
5921
|
+
const eventStore = (await import("./events-VDAC7E7K.js")).getEventStore();
|
|
5922
5922
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5923
5923
|
res.json({ success: true });
|
|
5924
5924
|
});
|
|
@@ -5970,7 +5970,7 @@ async function createServerHandle(config) {
|
|
|
5970
5970
|
let visionFallback;
|
|
5971
5971
|
let globalWorkdir;
|
|
5972
5972
|
try {
|
|
5973
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
5973
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-DEM6ASQM.js");
|
|
5974
5974
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5975
5975
|
const fallback = getVisionFallback(globalConfig);
|
|
5976
5976
|
if (fallback) {
|
|
@@ -6049,7 +6049,7 @@ async function createServerHandle(config) {
|
|
|
6049
6049
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
6050
6050
|
}
|
|
6051
6051
|
try {
|
|
6052
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
6052
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-DEM6ASQM.js");
|
|
6053
6053
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
6054
6054
|
const providerBackend = backend;
|
|
6055
6055
|
const configWithProvider = addProvider(globalConfig, {
|
|
@@ -6082,7 +6082,7 @@ async function createServerHandle(config) {
|
|
|
6082
6082
|
app.post("/api/init/config", async (req, res) => {
|
|
6083
6083
|
const { workdir, visionFallback } = req.body;
|
|
6084
6084
|
try {
|
|
6085
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6085
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-DEM6ASQM.js");
|
|
6086
6086
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
6087
6087
|
const updatedConfig = {
|
|
6088
6088
|
...globalConfig,
|
|
@@ -6110,7 +6110,7 @@ async function createServerHandle(config) {
|
|
|
6110
6110
|
});
|
|
6111
6111
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
6112
6112
|
const { id } = req.params;
|
|
6113
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
6113
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-DEM6ASQM.js");
|
|
6114
6114
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
6115
6115
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
6116
6116
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -6130,7 +6130,7 @@ async function createServerHandle(config) {
|
|
|
6130
6130
|
return res.status(400).json({ error: result.error });
|
|
6131
6131
|
}
|
|
6132
6132
|
const llmClient = getLLMClient();
|
|
6133
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6133
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-DEM6ASQM.js");
|
|
6134
6134
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
6135
6135
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
6136
6136
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -6151,7 +6151,7 @@ async function createServerHandle(config) {
|
|
|
6151
6151
|
if (!result.success) {
|
|
6152
6152
|
return res.status(400).json({ error: result.error });
|
|
6153
6153
|
}
|
|
6154
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6154
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-DEM6ASQM.js");
|
|
6155
6155
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
6156
6156
|
const updatedProviders = providerManager.getProviders();
|
|
6157
6157
|
const updatedConfig = {
|
|
@@ -6360,7 +6360,7 @@ async function createServerHandle(config) {
|
|
|
6360
6360
|
providerManager
|
|
6361
6361
|
);
|
|
6362
6362
|
const wss = wssExports.wss;
|
|
6363
|
-
const { QueueProcessor } = await import("./processor-
|
|
6363
|
+
const { QueueProcessor } = await import("./processor-KBSF2HFD.js");
|
|
6364
6364
|
const queueProcessor = new QueueProcessor({
|
|
6365
6365
|
sessionManager,
|
|
6366
6366
|
providerManager,
|
|
@@ -6433,4 +6433,4 @@ export {
|
|
|
6433
6433
|
createServerHandle,
|
|
6434
6434
|
createServer
|
|
6435
6435
|
};
|
|
6436
|
-
//# sourceMappingURL=chunk-
|
|
6436
|
+
//# sourceMappingURL=chunk-3JU6H6A4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeImageFromDataUrl,
|
|
3
3
|
ensureVisionFallbackConfigLoaded
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UL4JYQKK.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -281,8 +281,6 @@ var OpenFoxError = class extends Error {
|
|
|
281
281
|
this.details = details;
|
|
282
282
|
this.name = "OpenFoxError";
|
|
283
283
|
}
|
|
284
|
-
code;
|
|
285
|
-
details;
|
|
286
284
|
};
|
|
287
285
|
var SessionNotFoundError = class extends OpenFoxError {
|
|
288
286
|
constructor(sessionId) {
|
|
@@ -830,7 +828,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
830
828
|
try {
|
|
831
829
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
832
830
|
await ensureVisionFallbackConfigLoaded();
|
|
833
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
831
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-NOC3YYIB.js");
|
|
834
832
|
const paramsOptions = {
|
|
835
833
|
model,
|
|
836
834
|
request,
|
|
@@ -908,7 +906,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
908
906
|
});
|
|
909
907
|
try {
|
|
910
908
|
await ensureVisionFallbackConfigLoaded();
|
|
911
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
909
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-NOC3YYIB.js");
|
|
912
910
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
913
911
|
const createParams = await buildStreamingCreateParams({
|
|
914
912
|
model,
|
|
@@ -1124,4 +1122,4 @@ export {
|
|
|
1124
1122
|
setLlmStatus,
|
|
1125
1123
|
clearModelCache
|
|
1126
1124
|
};
|
|
1127
|
-
//# sourceMappingURL=chunk-
|
|
1125
|
+
//# sourceMappingURL=chunk-3XZ23PXM.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
buildMessagesFromStoredEvents,
|
|
4
4
|
foldContextState,
|
|
5
5
|
foldSessionState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7HLRI6JM.js";
|
|
7
7
|
import {
|
|
8
8
|
getDatabase
|
|
9
9
|
} from "./chunk-3EHGGBWE.js";
|
|
@@ -1144,4 +1144,4 @@ export {
|
|
|
1144
1144
|
compactContext,
|
|
1145
1145
|
getRecentUserPromptsForSession
|
|
1146
1146
|
};
|
|
1147
|
-
//# sourceMappingURL=chunk-
|
|
1147
|
+
//# sourceMappingURL=chunk-5GE3QJSZ.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/server/events/folding.ts
|
|
2
|
+
import stripAnsi from "strip-ansi";
|
|
2
3
|
function cloneMessage(message) {
|
|
3
4
|
return {
|
|
4
5
|
...message,
|
|
@@ -67,9 +68,9 @@ function appendSnapshotMessageContext(result, message) {
|
|
|
67
68
|
}
|
|
68
69
|
result.push({
|
|
69
70
|
role: "tool",
|
|
70
|
-
content: toolCall.result.success ? toolCall.result.output ?? "Success" : toolCall.result.output ? `${toolCall.result.output}
|
|
71
|
+
content: stripAnsi(toolCall.result.success ? toolCall.result.output ?? "Success" : toolCall.result.output ? `${toolCall.result.output}
|
|
71
72
|
|
|
72
|
-
Error: ${toolCall.result.error}` : `Error: ${toolCall.result.error}
|
|
73
|
+
Error: ${toolCall.result.error}` : `Error: ${toolCall.result.error}`),
|
|
73
74
|
toolCallId: toolCall.id
|
|
74
75
|
});
|
|
75
76
|
}
|
|
@@ -315,9 +316,9 @@ function buildContextMessagesFromStoredEvents(events, windowId, options) {
|
|
|
315
316
|
const msg = {
|
|
316
317
|
id: `tool-${data.toolCallId}`,
|
|
317
318
|
role: "tool",
|
|
318
|
-
content: data.result.success ? data.result.output ?? "Success" : data.result.output ? `${data.result.output}
|
|
319
|
+
content: stripAnsi(data.result.success ? data.result.output ?? "Success" : data.result.output ? `${data.result.output}
|
|
319
320
|
|
|
320
|
-
Error: ${data.result.error}` : `Error: ${data.result.error}
|
|
321
|
+
Error: ${data.result.error}` : `Error: ${data.result.error}`),
|
|
321
322
|
toolCallId: data.toolCallId
|
|
322
323
|
};
|
|
323
324
|
if (imageMeta?.dataUrl && imageMeta?.mimeType?.startsWith("image/")) {
|
|
@@ -677,4 +678,4 @@ export {
|
|
|
677
678
|
getMessagesForWindow,
|
|
678
679
|
buildContextMessagesFromMessages
|
|
679
680
|
};
|
|
680
|
-
//# sourceMappingURL=chunk-
|
|
681
|
+
//# sourceMappingURL=chunk-7HLRI6JM.js.map
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N25QUEPO.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7HLRI6JM.js";
|
|
24
24
|
import {
|
|
25
25
|
logger
|
|
26
26
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -293,4 +293,4 @@ export {
|
|
|
293
293
|
runBuilderTurn,
|
|
294
294
|
runVerifierTurn
|
|
295
295
|
};
|
|
296
|
-
//# sourceMappingURL=chunk-
|
|
296
|
+
//# sourceMappingURL=chunk-H22VHHQ4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectBackend,
|
|
3
3
|
detectModel
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3XZ23PXM.js";
|
|
5
5
|
import {
|
|
6
6
|
getGlobalConfigPath
|
|
7
7
|
} from "./chunk-R4HADRYO.js";
|
|
@@ -380,4 +380,4 @@ export {
|
|
|
380
380
|
activateProvider,
|
|
381
381
|
mergeConfigs
|
|
382
382
|
};
|
|
383
|
-
//# sourceMappingURL=chunk-
|
|
383
|
+
//# sourceMappingURL=chunk-J2DHVXRX.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
getContextMessages,
|
|
19
19
|
getCurrentContextWindowId,
|
|
20
20
|
getEventStore
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
22
22
|
import {
|
|
23
23
|
createChatDoneMessage,
|
|
24
24
|
createChatMessageMessage,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
AskUserInterrupt,
|
|
33
33
|
askUserTool
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-22CTURMH.js";
|
|
35
35
|
import {
|
|
36
36
|
SETTINGS_KEYS,
|
|
37
37
|
getSetting,
|
|
@@ -1416,9 +1416,6 @@ var PathAccessDeniedError = class extends Error {
|
|
|
1416
1416
|
this.reason = reason;
|
|
1417
1417
|
this.name = "PathAccessDeniedError";
|
|
1418
1418
|
}
|
|
1419
|
-
paths;
|
|
1420
|
-
tool;
|
|
1421
|
-
reason;
|
|
1422
1419
|
};
|
|
1423
1420
|
var pendingConfirmations = /* @__PURE__ */ new Map();
|
|
1424
1421
|
function registerPathConfirmation(callId, paths, sessionId) {
|
|
@@ -2983,6 +2980,7 @@ async function deleteSkill(configDir, skillId) {
|
|
|
2983
2980
|
}
|
|
2984
2981
|
|
|
2985
2982
|
// src/server/chat/agent-loop.ts
|
|
2983
|
+
import stripAnsi from "strip-ansi";
|
|
2986
2984
|
function getCurrentWindowMessageOptions(sessionId) {
|
|
2987
2985
|
const contextWindowId = getCurrentContextWindowId(sessionId);
|
|
2988
2986
|
return contextWindowId ? { contextWindowId } : void 0;
|
|
@@ -3048,7 +3046,7 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
|
|
|
3048
3046
|
type: "chat.ask_user",
|
|
3049
3047
|
data: { callId: error.callId, question: error.question }
|
|
3050
3048
|
});
|
|
3051
|
-
const { awaitAnswer } = await import("./ask-
|
|
3049
|
+
const { awaitAnswer } = await import("./ask-3RK5YJZE.js");
|
|
3052
3050
|
const answerPromise = awaitAnswer(error.callId);
|
|
3053
3051
|
if (!answerPromise) {
|
|
3054
3052
|
throw new Error(`No pending question found for callId: ${error.callId}`);
|
|
@@ -3073,9 +3071,9 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
|
|
|
3073
3071
|
}
|
|
3074
3072
|
toolMessages.push({
|
|
3075
3073
|
role: "tool",
|
|
3076
|
-
content: toolResult.success ? toolResult.output ?? "Success" : toolResult.output ? `${toolResult.output}
|
|
3074
|
+
content: stripAnsi(toolResult.success ? toolResult.output ?? "Success" : toolResult.output ? `${toolResult.output}
|
|
3077
3075
|
|
|
3078
|
-
Error: ${toolResult.error}` : `Error: ${toolResult.error}
|
|
3076
|
+
Error: ${toolResult.error}` : `Error: ${toolResult.error}`),
|
|
3079
3077
|
source: "history",
|
|
3080
3078
|
toolCallId: toolCall.id
|
|
3081
3079
|
});
|
|
@@ -3664,7 +3662,7 @@ var callSubAgentTool = {
|
|
|
3664
3662
|
};
|
|
3665
3663
|
}
|
|
3666
3664
|
try {
|
|
3667
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3665
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-PLVK22CF.js");
|
|
3668
3666
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3669
3667
|
const turnMetrics = new TurnMetrics();
|
|
3670
3668
|
const result = await executeSubAgent({
|
|
@@ -4797,4 +4795,4 @@ export {
|
|
|
4797
4795
|
getToolRegistryForAgent,
|
|
4798
4796
|
createToolRegistry
|
|
4799
4797
|
};
|
|
4800
|
-
//# sourceMappingURL=chunk-
|
|
4798
|
+
//# sourceMappingURL=chunk-N25QUEPO.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
detectBackend,
|
|
5
5
|
detectModel,
|
|
6
6
|
setLlmStatus
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3XZ23PXM.js";
|
|
8
8
|
import {
|
|
9
9
|
logger
|
|
10
10
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -465,4 +465,4 @@ export {
|
|
|
465
465
|
parseDefaultModelSelection,
|
|
466
466
|
createProviderManager
|
|
467
467
|
};
|
|
468
|
-
//# sourceMappingURL=chunk-
|
|
468
|
+
//# sourceMappingURL=chunk-OOIRCXAY.js.map
|
|
@@ -27,7 +27,7 @@ Options:
|
|
|
27
27
|
}
|
|
28
28
|
async function runNetworkSetup(mode) {
|
|
29
29
|
const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-JF2HDJ6P.js");
|
|
30
|
-
const { saveGlobalConfig } = await import("./config-
|
|
30
|
+
const { saveGlobalConfig } = await import("./config-DEM6ASQM.js");
|
|
31
31
|
const { getAuthKeyPath } = await import("./paths-ZRI56O63.js");
|
|
32
32
|
const existingAuth = await loadAuthConfig(mode);
|
|
33
33
|
if (existingAuth) {
|
|
@@ -88,7 +88,7 @@ async function runNetworkSetup(mode) {
|
|
|
88
88
|
console.log("\u2713 Configuration saved!\n");
|
|
89
89
|
}
|
|
90
90
|
async function runConfig(mode) {
|
|
91
|
-
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-
|
|
91
|
+
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-DEM6ASQM.js");
|
|
92
92
|
const { getGlobalConfigPath } = await import("./paths-ZRI56O63.js");
|
|
93
93
|
const config = await loadGlobalConfig(mode);
|
|
94
94
|
const configPath = getGlobalConfigPath(mode);
|
|
@@ -143,18 +143,18 @@ async function runCli(options) {
|
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
case "provider": {
|
|
146
|
-
const { runProviderCommand } = await import("./provider-
|
|
146
|
+
const { runProviderCommand } = await import("./provider-K3PHZO27.js");
|
|
147
147
|
const [, subcommand] = positionals;
|
|
148
148
|
await runProviderCommand(mode, subcommand);
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
default: {
|
|
152
|
-
const { configFileExists } = await import("./config-
|
|
152
|
+
const { configFileExists } = await import("./config-DEM6ASQM.js");
|
|
153
153
|
const configExists = await configFileExists(mode);
|
|
154
154
|
if (!configExists) {
|
|
155
155
|
await runNetworkSetup(mode);
|
|
156
156
|
}
|
|
157
|
-
const { runServe } = await import("./serve-
|
|
157
|
+
const { runServe } = await import("./serve-DERN4AB6.js");
|
|
158
158
|
await runServe({
|
|
159
159
|
mode,
|
|
160
160
|
port: values.port ? parseInt(values.port) : void 0,
|
|
@@ -167,4 +167,4 @@ async function runCli(options) {
|
|
|
167
167
|
export {
|
|
168
168
|
runCli
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-PCOG5FQD.js.map
|
|
@@ -29,7 +29,7 @@ function isVisionFallbackEnabled() {
|
|
|
29
29
|
async function ensureVisionFallbackConfigLoaded() {
|
|
30
30
|
if (configLoaded) return;
|
|
31
31
|
try {
|
|
32
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
32
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-DEM6ASQM.js");
|
|
33
33
|
const { getRuntimeConfig } = await import("./runtime-config-2XJJIMSC.js");
|
|
34
34
|
const runtimeConfig = getRuntimeConfig();
|
|
35
35
|
const mode = runtimeConfig.mode ?? "production";
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
describeImage,
|
|
136
136
|
describeImageFromDataUrl
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
//# sourceMappingURL=chunk-UL4JYQKK.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
saveGlobalConfig,
|
|
14
14
|
setDefaultModelSelection,
|
|
15
15
|
trySmartDefaults
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-J2DHVXRX.js";
|
|
17
|
+
import "./chunk-3XZ23PXM.js";
|
|
18
18
|
import "./chunk-XFXOSPYH.js";
|
|
19
19
|
import "./chunk-R4HADRYO.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-UL4JYQKK.js";
|
|
21
21
|
import "./chunk-PNBH3RAX.js";
|
|
22
22
|
export {
|
|
23
23
|
activateProvider,
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
setDefaultModelSelection,
|
|
36
36
|
trySmartDefaults
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=config-
|
|
38
|
+
//# sourceMappingURL=config-DEM6ASQM.js.map
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
isFileInCache,
|
|
37
37
|
isStoredEvent,
|
|
38
38
|
isTurnEvent
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
40
40
|
import {
|
|
41
41
|
buildContextMessagesFromEventHistory,
|
|
42
42
|
buildContextMessagesFromMessages,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
foldTodos,
|
|
54
54
|
foldTurnEventsToSnapshotMessages,
|
|
55
55
|
getMessagesForWindow
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-7HLRI6JM.js";
|
|
57
57
|
import "./chunk-3EHGGBWE.js";
|
|
58
58
|
import "./chunk-TVQOONDR.js";
|
|
59
59
|
import "./chunk-PNBH3RAX.js";
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
isStoredEvent,
|
|
112
112
|
isTurnEvent
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=events-
|
|
114
|
+
//# sourceMappingURL=events-VDAC7E7K.js.map
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
foldTodos,
|
|
16
16
|
foldTurnEventsToSnapshotMessages,
|
|
17
17
|
getMessagesForWindow
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7HLRI6JM.js";
|
|
19
19
|
export {
|
|
20
20
|
buildContextMessagesFromEventHistory,
|
|
21
21
|
buildContextMessagesFromMessages,
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
foldTurnEventsToSnapshotMessages,
|
|
35
35
|
getMessagesForWindow
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=folding-
|
|
37
|
+
//# sourceMappingURL=folding-NDFQCISZ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn,
|
|
5
5
|
runVerifierTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-H22VHHQ4.js";
|
|
7
7
|
import {
|
|
8
8
|
TurnMetrics,
|
|
9
9
|
createChatDoneEvent,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
createMessageStartEvent,
|
|
12
12
|
createToolCallEvent,
|
|
13
13
|
createToolResultEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N25QUEPO.js";
|
|
15
15
|
import "./chunk-NBU6KIOD.js";
|
|
16
16
|
import "./chunk-574HZVLE.js";
|
|
17
17
|
import "./chunk-XFXOSPYH.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5GE3QJSZ.js";
|
|
19
|
+
import "./chunk-7HLRI6JM.js";
|
|
20
20
|
import "./chunk-NJWPSSRW.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-22CTURMH.js";
|
|
22
22
|
import "./chunk-7IOZFJBW.js";
|
|
23
23
|
import "./chunk-XKFPU2FA.js";
|
|
24
24
|
import "./chunk-3EHGGBWE.js";
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
runChatTurn,
|
|
39
39
|
runVerifierTurn
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=orchestrator-
|
|
41
|
+
//# sourceMappingURL=orchestrator-KZI7B5IS.js.map
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openfox",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"description": "Local-LLM-first agentic coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"react-syntax-highlighter": "^16.1.1",
|
|
71
71
|
"remark-gfm": "^4.0.1",
|
|
72
72
|
"sql-language-server": "^1.7.1",
|
|
73
|
+
"strip-ansi": "^7.2.0",
|
|
73
74
|
"turndown": "^7.2.2",
|
|
74
75
|
"typescript": "^5.8.2",
|
|
75
76
|
"typescript-language-server": "^5.1.3",
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getEventStore,
|
|
7
7
|
updateSessionMetadata
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5GE3QJSZ.js";
|
|
9
9
|
import {
|
|
10
10
|
buildMessagesFromStoredEvents,
|
|
11
11
|
foldPendingConfirmations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7HLRI6JM.js";
|
|
13
13
|
import {
|
|
14
14
|
createChatMessageMessage,
|
|
15
15
|
createContextStateMessage,
|
|
@@ -188,7 +188,7 @@ var QueueProcessor = class {
|
|
|
188
188
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
189
189
|
model: llmClient.getModel()
|
|
190
190
|
};
|
|
191
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
191
|
+
const { runChatTurn } = await import("./orchestrator-KZI7B5IS.js");
|
|
192
192
|
runChatTurn({
|
|
193
193
|
sessionManager,
|
|
194
194
|
sessionId,
|
|
@@ -233,4 +233,4 @@ var QueueProcessor = class {
|
|
|
233
233
|
export {
|
|
234
234
|
QueueProcessor
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=processor-
|
|
236
|
+
//# sourceMappingURL=processor-KBSF2HFD.js.map
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
loadGlobalConfig,
|
|
6
6
|
removeProvider,
|
|
7
7
|
saveGlobalConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J2DHVXRX.js";
|
|
9
9
|
import {
|
|
10
10
|
fetchAvailableModelsFromBackend
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OOIRCXAY.js";
|
|
12
12
|
import {
|
|
13
13
|
detectBackend,
|
|
14
14
|
detectModel
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3XZ23PXM.js";
|
|
16
16
|
import "./chunk-XFXOSPYH.js";
|
|
17
17
|
import "./chunk-R4HADRYO.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-UL4JYQKK.js";
|
|
19
19
|
import "./chunk-PNBH3RAX.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/provider.ts
|
|
@@ -248,7 +248,7 @@ async function runProviderAdd(mode) {
|
|
|
248
248
|
isActive: makeActive
|
|
249
249
|
});
|
|
250
250
|
if (makeActive) {
|
|
251
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
251
|
+
const { setDefaultModelSelection } = await import("./config-DEM6ASQM.js");
|
|
252
252
|
newConfig = setDefaultModelSelection(newConfig, newConfig.providers[newConfig.providers.length - 1].id, selectedModel);
|
|
253
253
|
}
|
|
254
254
|
await saveGlobalConfig(mode, newConfig);
|
|
@@ -372,4 +372,4 @@ export {
|
|
|
372
372
|
runProviderRemove,
|
|
373
373
|
runProviderUse
|
|
374
374
|
};
|
|
375
|
-
//# sourceMappingURL=provider-
|
|
375
|
+
//# sourceMappingURL=provider-K3PHZO27.js.map
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
getActiveProvider,
|
|
3
3
|
getDefaultModel,
|
|
4
4
|
loadGlobalConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J2DHVXRX.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
createServer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3JU6H6A4.js";
|
|
10
10
|
import "./chunk-QDEKU5RL.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-H22VHHQ4.js";
|
|
12
|
+
import "./chunk-N25QUEPO.js";
|
|
13
13
|
import "./chunk-NBU6KIOD.js";
|
|
14
14
|
import "./chunk-574HZVLE.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-OOIRCXAY.js";
|
|
16
|
+
import "./chunk-3XZ23PXM.js";
|
|
17
17
|
import "./chunk-XFXOSPYH.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5GE3QJSZ.js";
|
|
19
|
+
import "./chunk-7HLRI6JM.js";
|
|
20
20
|
import "./chunk-NJWPSSRW.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-22CTURMH.js";
|
|
22
22
|
import "./chunk-7IOZFJBW.js";
|
|
23
23
|
import "./chunk-XKFPU2FA.js";
|
|
24
24
|
import "./chunk-3EHGGBWE.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
loadConfig
|
|
34
34
|
} from "./chunk-TVQOONDR.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-UL4JYQKK.js";
|
|
36
36
|
import {
|
|
37
37
|
logger
|
|
38
38
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -188,4 +188,4 @@ async function runServe(options) {
|
|
|
188
188
|
export {
|
|
189
189
|
runServe
|
|
190
190
|
};
|
|
191
|
-
//# sourceMappingURL=serve-
|
|
191
|
+
//# sourceMappingURL=serve-DERN4AB6.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3JU6H6A4.js";
|
|
5
5
|
import "../chunk-QDEKU5RL.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-H22VHHQ4.js";
|
|
7
|
+
import "../chunk-N25QUEPO.js";
|
|
8
8
|
import "../chunk-NBU6KIOD.js";
|
|
9
9
|
import "../chunk-574HZVLE.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-OOIRCXAY.js";
|
|
11
|
+
import "../chunk-3XZ23PXM.js";
|
|
12
12
|
import "../chunk-XFXOSPYH.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-5GE3QJSZ.js";
|
|
14
|
+
import "../chunk-7HLRI6JM.js";
|
|
15
15
|
import "../chunk-NJWPSSRW.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-22CTURMH.js";
|
|
17
17
|
import "../chunk-7IOZFJBW.js";
|
|
18
18
|
import "../chunk-XKFPU2FA.js";
|
|
19
19
|
import "../chunk-3EHGGBWE.js";
|
|
@@ -21,7 +21,7 @@ import "../chunk-QY7BMXWT.js";
|
|
|
21
21
|
import "../chunk-Y6HBEACI.js";
|
|
22
22
|
import "../chunk-R4HADRYO.js";
|
|
23
23
|
import "../chunk-TVQOONDR.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-UL4JYQKK.js";
|
|
25
25
|
import "../chunk-PNBH3RAX.js";
|
|
26
26
|
export {
|
|
27
27
|
createServer,
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N25QUEPO.js";
|
|
15
15
|
import "./chunk-NBU6KIOD.js";
|
|
16
16
|
import "./chunk-574HZVLE.js";
|
|
17
17
|
import "./chunk-XFXOSPYH.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5GE3QJSZ.js";
|
|
19
|
+
import "./chunk-7HLRI6JM.js";
|
|
20
20
|
import "./chunk-NJWPSSRW.js";
|
|
21
21
|
import {
|
|
22
22
|
AskUserInterrupt,
|
|
23
23
|
cancelQuestionsForSession,
|
|
24
24
|
provideAnswer
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-22CTURMH.js";
|
|
26
26
|
import "./chunk-7IOZFJBW.js";
|
|
27
27
|
import "./chunk-XKFPU2FA.js";
|
|
28
28
|
import "./chunk-3EHGGBWE.js";
|
|
@@ -47,4 +47,4 @@ export {
|
|
|
47
47
|
stepDoneTool,
|
|
48
48
|
validateToolAction
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=tools-
|
|
50
|
+
//# sourceMappingURL=tools-PLVK22CF.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getVisionFallbackConfig,
|
|
8
8
|
isVisionFallbackEnabled,
|
|
9
9
|
setVisionFallbackConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UL4JYQKK.js";
|
|
11
11
|
import "./chunk-PNBH3RAX.js";
|
|
12
12
|
export {
|
|
13
13
|
clearDescriptionCache,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
isVisionFallbackEnabled,
|
|
20
20
|
setVisionFallbackConfig
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=vision-fallback-
|
|
22
|
+
//# sourceMappingURL=vision-fallback-NOC3YYIB.js.map
|
|
@@ -73,7 +73,7 @@ WARNING: This link could potentially be dangerous`)){const y=window.open();if(y)
|
|
|
73
73
|
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
74
74
|
* http://bellard.org/jslinux/
|
|
75
75
|
* Copyright (c) 2011 Fabrice Bellard
|
|
76
|
-
*/var kS=2,ES=1,jS=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let r=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(r._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let r=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),c=Math.max(0,parseInt(i.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),p={top:parseInt(u.getPropertyValue("padding-top")),bottom:parseInt(u.getPropertyValue("padding-bottom")),right:parseInt(u.getPropertyValue("padding-right")),left:parseInt(u.getPropertyValue("padding-left"))},l=p.top+p.bottom,h=p.right+p.left,f=s-l,g=c-h-r;return{cols:Math.max(kS,Math.floor(g/e.css.cell.width)),rows:Math.max(ES,Math.floor(f/e.css.cell.height))}}};function NS({sessionId:e,onClose:r,onEscape:i,autoFocus:s}){const c=P.useRef(null),u=P.useRef(e),p=P.useRef(null),l=P.useRef(null),h=sr(g=>g.writeSession),f=sr(g=>g.resizeSession);return P.useEffect(()=>{u.current=e},[e]),P.useEffect(()=>{if(!i)return;const g=m=>{(m.key==="²"||m.key==="`")&&(m.preventDefault(),m.stopPropagation(),i())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i]),P.useEffect(()=>{if(!c.current)return;const g=new CS.Terminal({fontFamily:'"JetBrains Mono", monospace',fontSize:13,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff",cursorAccent:"#1a1a1a"},cursorBlink:!0,cursorStyle:"bar",convertEol:!0}),m=new jS;g.loadAddon(m),p.current={term:g,fitAddon:m},c.current.addEventListener("keydown",C=>{(C.key==="²"||C.key==="`")&&i&&(C.preventDefault(),C.stopPropagation(),i())}),g.open(c.current);const v=c.current.querySelector(".xterm");v&&(v.style.padding="8px"),m.fit(),s&&setTimeout(()=>{g.focus()},150);const S=new ResizeObserver(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{requestAnimationFrame(()=>{var b;m.fit&&m.fit();const C=(b=p.current)==null?void 0:b.term;C&&C.cols>0&&C.rows>0&&f(u.current,C.cols,C.rows)})},100)});S.observe(c.current),g.onData(C=>{if((C==="\x1B"||C==="²"||C==="`")&&i){i();return}h(u.current,C)}),g.onKey(C=>{(C.key==="\x1B"||C.key==="²"||C.key==="`")&&i&&(C.domEvent.stopPropagation(),i())});const E=Ht.subscribe(C=>{var b,y;if(C.type==="terminal.output"&&((b=C.payload)==null?void 0:b.sessionId)===u.current){const x=(y=C.payload)==null?void 0:y.data;x&&g.write(x)}});return()=>{E(),S.disconnect(),l.current&&clearTimeout(l.current),g.dispose(),p.current=null}},[e,h,f]),o.jsxs("div",{className:"flex flex-col h-full bg-[#1a1a1a]",children:[o.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-2 py-1 bg-[#252525] border-b border-[#333]",children:[o.jsx("div",{}),o.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-[#333] text-[#888] hover:text-[#ccc] transition-colors",title:"Close terminal",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.55.5 0 0 1 0-.708z"})})})]}),o.jsx("div",{ref:c,className:"flex-1 relative overflow-hidden",tabIndex:0,onKeyDown:g=>{(g.key==="²"||g.key==="`")&&i&&(g.preventDefault(),g.stopPropagation(),i())}})]})}function TS(e){return e===1?"grid-cols-1":e===2?"grid-cols-1 lg:grid-cols-2":"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3"}function AS({isOpen:e,onClose:r,onFocusChat:i}){const s=sr(C=>C.createSession),c=sr(C=>C.killSession),u=sr(C=>C.sessions),p=sr(C=>C.setWorkdir),l=sr(C=>C.fetchSessions),h=Ut(C=>C.currentProject),[f,g]=P.useState(!0),m=P.useRef(null),v=P.useRef(!1),S=P.useRef(!1),E=P.useCallback(()=>{r(),i()},[r,i]);return P.useEffect(()=>{h!=null&&h.workdir&&p(h.workdir)},[h==null?void 0:h.workdir,p]),P.useEffect(()=>{e&&(g(!0),l().finally(()=>g(!1)))},[e,l]),P.useEffect(()=>{e&&u.length===0&&!f&&!S.current&&(S.current=!0,s())},[e,u.length,f,s]),P.useEffect(()=>{e?(v.current=!0,setTimeout(()=>{var C;(C=m.current)==null||C.focus(),setTimeout(()=>{v.current=!1},200)},100)):S.current=!1},[e]),P.useEffect(()=>{if(!e)return;const C=b=>{v.current||(b.key==="Escape"||b.key==="²"||b.key==="`")&&(b.preventDefault(),r(),i())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[e,r,i]),e?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-x-0 top-[50vh] bottom-0 z-[100] bg-black/40",style:{pointerEvents:"auto"},onClick:E}),o.jsxs("div",{ref:m,tabIndex:-1,className:"fixed inset-x-0 top-0 z-[100] h-[50vh] bg-bg-primary border-b border-border flex flex-col animate-slide-down outline-none",onClick:C=>C.stopPropagation(),onKeyDown:C=>{(C.key==="Escape"||C.key==="²"||C.key==="`")&&(C.preventDefault(),E())},children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Terminal"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>s(),className:"p-2 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"New terminal",children:o.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})}),o.jsx("button",{onClick:()=>{r(),i()},className:"p-2 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Close (Esc)",children:o.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})]}),o.jsx("div",{className:"flex-1 min-h-0 p-2 overflow-auto",children:f?o.jsx("div",{className:"flex items-center justify-center h-full text-text-muted",children:"Loading..."}):u.length===0?o.jsx("div",{className:"flex items-center justify-center h-full text-text-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-4",children:"No terminal sessions"}),o.jsx("button",{onClick:()=>s(),className:"px-4 py-2 bg-accent-primary/25 text-white rounded hover:bg-accent-primary/40 transition-colors",children:"Create Terminal"})]})}):o.jsx("div",{className:`grid ${TS(u.length)} gap-2 h-full auto-rows-fr`,children:u.map(C=>o.jsx(NS,{sessionId:C.id,onClose:()=>c(C.id),onEscape:E,autoFocus:u.length===1},C.id))})})]})]}):null}function Ka({items:e,trigger:r,minWidth:i="120px"}){const[s,c]=P.useState(!1),[u,p]=P.useState(null),l=P.useRef(null),h=P.useRef(null);P.useEffect(()=>{function v(S){h.current&&!h.current.contains(S.target)&&c(!1)}return s&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[s]);const f=P.useCallback(()=>{if(!l.current)return;const v=l.current.getBoundingClientRect(),S=200,C=window.innerHeight-v.bottom<S;p({top:C?v.top-S-4:v.bottom+4,left:v.left,alignToTop:C})},[]),g=v=>{v.stopPropagation(),s||f(),c(!s)},m=u&&o.jsx("div",{ref:h,"data-testid":"session-dropdown-menu",className:`fixed bg-bg-secondary border border-border rounded shadow-lg z-50 ${u.alignToTop?"mb-1":"mt-1"}`,style:{top:u.top,left:u.left,minWidth:i},children:e.map((v,S)=>{const E=o.jsxs(o.Fragment,{children:[v.icon&&o.jsx("span",{className:"w-4 h-4 flex-shrink-0",children:v.icon}),v.label]});return v.href?o.jsx("a",{href:v.href,onClick:C=>{var b;(b=v.onClick)==null||b.call(v,C),c(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-bg-tertiary transition-colors flex items-center gap-2 ${v.danger?"text-accent-error hover:bg-accent-error/10":"text-text-primary"} ${S!==e.length-1?"border-b border-border":""}`,children:E},S):o.jsx("button",{onClick:C=>{var b;(b=v.onClick)==null||b.call(v,C),v.closeOnClick!==!1&&c(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-bg-tertiary transition-colors flex items-center gap-2 ${v.danger?"text-accent-error hover:bg-accent-error/10":"text-text-primary"} ${S!==e.length-1?"border-b border-border":""}`,children:E},S)})});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"relative",children:o.jsx("div",{ref:l,onClick:g,children:r})}),s&&Hl.createPortal(m,document.body)]})}function ub(e){const r=new Date(e),s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][r.getDay()],c=r.getFullYear(),u=String(r.getMonth()+1).padStart(2,"0"),p=String(r.getDate()).padStart(2,"0");return`${s} ${c}/${u}/${p}`}function gh(e){const r=new Date(e),i=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0");return`${i}:${s}`}function DS(e){const r=new Date(e),i=new Date,s=new Date(i.getFullYear(),i.getMonth(),i.getDate()),c=new Date(r.getFullYear(),r.getMonth(),r.getDate()),u=Math.floor((s.getTime()-c.getTime())/(1e3*60*60*24)),p=gh(e);if(u===0)return`today ${p}`;if(u===1)return`yesterday ${p}`;if(u<7)return`${u} days ago ${p}`;{const l=r.getFullYear(),h=String(r.getMonth()+1).padStart(2,"0"),f=String(r.getDate()).padStart(2,"0");return`${l}/${h}/${f} ${p}`}}function LS(e){const r=new Date(e),i=r.getFullYear(),s=String(r.getMonth()+1).padStart(2,"0"),c=String(r.getDate()).padStart(2,"0");return`${i}-${s}-${c}`}function db(e){const r=new Map;for(const c of e){const u=LS(c.updatedAt);r.has(u)||r.set(u,[]),r.get(u).push(c)}for(const[c,u]of r)u.sort((p,l)=>{const h=new Date(p.updatedAt).getTime();return new Date(l.updatedAt).getTime()-h});const i=Array.from(r.keys()).sort((c,u)=>u.localeCompare(c)),s=new Map;for(const c of i)s.set(c,r.get(c));return s}function RS({projects:e,currentProject:r}){const i=Ut(u=>u.loadProject),c=[...e].sort((u,p)=>u.name.localeCompare(p.name)).map(u=>({label:u.name,icon:u.id===r.id?o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,href:`/p/${u.id}`,onClick:()=>{i(u.id)}}));return o.jsx(Ka,{items:c,trigger:o.jsxs("button",{className:"text-text-secondary hover:text-text-primary hover:underline text-sm truncate flex items-center gap-1",title:r.name,children:[r.name,o.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),minWidth:"250px"})}function MS({currentProject:e,sessions:r,currentSession:i,projectIdFromUrl:s}){const[c,u]=P.useState(!1),p=P.useRef(null);if(P.useEffect(()=>{function f(g){p.current&&!p.current.contains(g.target)&&u(!1)}if(c)return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[c]),!(e!=null&&e.id)||e.id!==s)return null;const l=r.filter(f=>f.projectId===e.id).sort((f,g)=>new Date(g.updatedAt).getTime()-new Date(f.updatedAt).getTime()).slice(0,5),h=[];h.push({label:o.jsxs(Dn,{href:`/p/${e.id}/new`,className:"flex items-center gap-2",children:[o.jsx("svg",{className:"w-3 h-3 text-accent-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),o.jsx("span",{className:"text-sm",children:"New Session"})]}),onClick:()=>{}});for(const f of l)h.push({label:o.jsx(Dn,{href:`/p/${e.id}/s/${f.id}`,className:"flex items-center gap-2 truncate text-sm",children:o.jsx("span",{children:f.title??f.id.slice(0,8)})}),icon:f.id===(i==null?void 0:i.id)?o.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,onClick:()=>{}});return h.push({label:o.jsxs(Dn,{href:"/",className:"flex items-center gap-2 text-text-muted hover:text-text-primary",children:[o.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),o.jsx("span",{className:"text-sm",children:"Projects"})]}),onClick:()=>{}}),o.jsxs("div",{className:"relative",ref:p,children:[o.jsxs("button",{type:"button",onClick:()=>u(!c),className:"flex items-center gap-1 px-1.5 py-0.5 rounded hover:bg-bg-tertiary transition-colors",children:[o.jsx("span",{className:"text-sm text-text-secondary font-medium",children:e==null?void 0:e.name}),o.jsx("svg",{className:"w-3 h-3 text-text-muted flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),c&&h.length>0&&o.jsx("div",{className:"absolute top-full left-0 mt-1 w-56 bg-bg-secondary border border-border rounded-lg shadow-lg overflow-hidden z-50",children:h.map((f,g)=>{if(f.label&&typeof f.label=="object"&&f.label.type===Dn){const m=f.label,v=m.props.href||"";return o.jsxs(Dn,{href:v,className:"flex items-center gap-2 px-3 py-2 text-sm border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,m.props.children]},g)}return f.href?o.jsxs("a",{href:f.href,className:"flex items-center gap-2 px-3 py-2 text-sm border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,f.label]},g):o.jsxs("button",{type:"button",onClick:()=>{var m;(m=f.onClick)==null||m.call(f),u(!1)},className:"flex items-center gap-2 px-3 py-2 text-sm w-full text-left border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,f.label]},g)})})]})}function OS({sessions:e,currentProject:r,currentSession:i}){var h;const s=Ce(f=>f.loadSession),c=e.filter(f=>f.projectId===r.id).slice(0,15),u=db(c),p=[];p.push({label:o.jsxs(Dn,{href:`/p/${r.id}/new`,className:"flex items-center gap-2 px-3 py-2 min-w-[160px]","data-testid":"session-dropdown-new-session",children:[o.jsx("svg",{className:"w-4 h-4 text-accent-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),o.jsx("span",{className:"text-sm",children:"New session"})]}),onClick:()=>{}});for(const[f,g]of u){const m=g[0];if(m){p.push({label:o.jsx("div",{className:"px-3 py-2 text-text-muted text-xs font-medium cursor-default",children:ub(m.updatedAt)}),onClick:()=>{}});for(const v of g)p.push({label:o.jsxs("div",{className:"min-w-[160px]",children:[o.jsx("div",{className:"truncate text-sm",children:v.title??v.id.slice(0,8)}),o.jsx("div",{className:"text-text-muted text-xs",children:gh(v.updatedAt)})]}),icon:v.id===(i==null?void 0:i.id)?o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,href:`/p/${r.id}/s/${v.id}`,onClick:()=>{s(v.id)}})}}const l=i?((h=i.metadata)==null?void 0:h.title)??i.id.slice(0,8):"No session selected";return o.jsx(Ka,{items:p,trigger:o.jsxs("button",{className:"text-text-secondary hover:text-text-primary hover:underline text-sm truncate flex items-center gap-1",title:l,"data-testid":"header-session-dropdown",children:[l,o.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),minWidth:"280px"})}function IS({onMenuClick:e,onCriteriaToggle:r}){const[i,s]=P.useState(!1),[c]=ar(),u=c.startsWith("/p/"),p=/^\/p\/[^/]+\/s\/[^/]+$/.test(c),l=Ce(b=>b.currentSession),h=Ce(b=>b.sessions),f=Ut(b=>b.currentProject),g=Ut(b=>b.projects),m=jt(b=>b.startAutoRefresh),v=jt(b=>b.stopAutoRefresh),S=sr(b=>b.setOpen),E=sr(b=>b.isOpen),C=P.useCallback(()=>{const b=document.querySelector('textarea[placeholder*="What would you like to build"], textarea[placeholder*="Send a message"]');b&&b.focus()},[]);return P.useEffect(()=>{const b=y=>{(y.key==="²"||y.key==="`")&&(y.preventDefault(),E||S(!0))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[E,S]),P.useEffect(()=>(m(),()=>v()),[m,v]),o.jsxs("header",{className:"h-8 bg-bg-secondary border-b border-border flex items-center justify-between px-2",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e&&u&&o.jsx("button",{onClick:e,className:"flex-shrink-0 p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Toggle session list",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),o.jsx(Dn,{href:"/",className:"text-accent-primary font-semibold text-base hover:underline flex-shrink-0 hidden md:inline",children:"OpenFox"}),f&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"hidden md:inline text-text-muted flex-shrink-0",children:"/"}),o.jsx("span",{className:"hidden md:inline",children:o.jsx(RS,{projects:g,currentProject:f})}),o.jsx("span",{className:"md:hidden",children:o.jsx(MS,{currentProject:f,sessions:h,currentSession:l,projectIdFromUrl:u&&c.split("/")[2]||null},f==null?void 0:f.id)}),o.jsx("span",{className:"hidden md:inline text-text-muted flex-shrink-0",children:"/"}),o.jsx("span",{className:"hidden md:inline",children:o.jsx(OS,{sessions:h,currentProject:f,currentSession:l})})]})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[u&&o.jsx("button",{onClick:()=>S(!E),className:`p-2.5 rounded hover:bg-bg-tertiary transition-colors ${E?"text-accent-primary":"text-text-muted hover:text-text-primary"}`,title:"Toggle terminal (²)",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3 1h10v1H5V6zm10 7H5v1h10v-1zm-10 2H5v1h10v-1z",clipRule:"evenodd"})})}),o.jsx("button",{onClick:()=>s(!0),className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Settings",children:o.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),o.jsx("button",{onClick:()=>{localStorage.removeItem("openfox_token"),window.location.reload()},className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Logout",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})})}),r&&p&&o.jsx("button",{onClick:r,className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Toggle summary sidebar",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]}),o.jsx(yS,{isOpen:i,onClose:()=>s(!1)}),o.jsx(AS,{isOpen:E,onClose:()=>S(!1),onFocusChat:C})]})}function BS({isOpen:e,onClose:r,title:i,label:s,description:c,placeholder:u,value:p,isLoading:l=!1,onSave:h}){const[f,g]=P.useState(p),[m,v]=P.useState(!1),[S,E]=P.useState(!1);P.useEffect(()=>{g(p),v(!1)},[p]);const C=_=>{g(_.target.value),v(!0)},b=async()=>{E(!0),await h(f),E(!1),v(!1),r()},y=()=>{g(p),v(!1),r()},x=l||S;return o.jsx(dn,{isOpen:e,onClose:y,title:i,size:"lg",children:o.jsxs("div",{className:"flex flex-col h-full -mt-1",children:[o.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1 flex-shrink-0",children:s}),o.jsx("p",{className:"text-sm text-text-muted mb-3 flex-shrink-0",children:c}),o.jsx("div",{className:"flex-1 min-h-[150px]",children:o.jsx("textarea",{value:f,onChange:C,placeholder:u,className:"w-full h-full px-3 py-2 bg-bg-tertiary border border-border rounded text-sm font-mono resize-none focus:outline-none focus:ring-1 focus:ring-accent-primary",disabled:x})}),o.jsxs("div",{className:"flex justify-end gap-2 pt-2 mt-3 border-t border-border flex-shrink-0",children:[o.jsx(dt,{variant:"secondary",onClick:y,children:"Cancel"}),o.jsx(dt,{variant:"primary",onClick:b,disabled:!m||x,children:S?"Saving...":"Save"})]})]})})}function zS({isOpen:e,onClose:r,project:i}){const s=Ut(u=>u.updateProject),c=async u=>{s(i.id,{customInstructions:u||null}),await new Promise(p=>setTimeout(p,100))};return o.jsx(BS,{isOpen:e,onClose:r,title:`${i.name} Settings`,label:"Project Instructions",description:"These instructions are injected into prompts when working in this project. They are applied after global instructions but before AGENTS.md files.",placeholder:"Enter project-specific instructions...",value:i.customInstructions??"",onSave:c})}function hb({projectId:e,isOpen:r=!0,onClose:i}){const[,s]=ar(),[c,u]=P.useState(!1),p=Ce(j=>j.sessions),l=Ce(j=>j.currentSession),h=Ce(j=>j.unreadSessionIds),f=Ce(j=>j.deleteSession),g=Ce(j=>j.deleteAllSessions),m=Ce(j=>j.loadMoreSessions),v=Ce(j=>j.sessionsHasMore),S=Ce(j=>j.sessionsPaginationLoading),E=Ut(j=>j.currentProject),C=P.useRef(null),b=P.useCallback(()=>{v&&!S&&E&&m(E.id)},[v,S,E,m]);P.useEffect(()=>{if(!C.current||!v)return;const j=new IntersectionObserver(A=>{const N=A[0];N&&N.isIntersecting&&b()},{threshold:.1});return j.observe(C.current),()=>j.disconnect()},[v,b]);const y=p.filter(j=>j.projectId===(E==null?void 0:E.id)),x=(j,A)=>{A==null||A.stopPropagation(),confirm("Delete this session?")&&(f(j),(l==null?void 0:l.id)===j&&s(`/p/${e}`))},_=()=>{confirm("Delete all sessions in this project? This cannot be undone.")&&(g(e),s(`/p/${e}`))};return o.jsxs(o.Fragment,{children:[r&&i&&o.jsx("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:i}),o.jsxs("aside",{className:`
|
|
76
|
+
*/var kS=2,ES=1,jS=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let r=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(r._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let r=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),c=Math.max(0,parseInt(i.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),p={top:parseInt(u.getPropertyValue("padding-top")),bottom:parseInt(u.getPropertyValue("padding-bottom")),right:parseInt(u.getPropertyValue("padding-right")),left:parseInt(u.getPropertyValue("padding-left"))},l=p.top+p.bottom,h=p.right+p.left,f=s-l,g=c-h-r;return{cols:Math.max(kS,Math.floor(g/e.css.cell.width)),rows:Math.max(ES,Math.floor(f/e.css.cell.height))}}};function NS({sessionId:e,onClose:r,onEscape:i,autoFocus:s}){const c=P.useRef(null),u=P.useRef(e),p=P.useRef(null),l=P.useRef(null),h=sr(g=>g.writeSession),f=sr(g=>g.resizeSession);return P.useEffect(()=>{u.current=e},[e]),P.useEffect(()=>{if(!i)return;const g=m=>{(m.key==="²"||m.key==="`")&&(m.preventDefault(),m.stopPropagation(),i())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i]),P.useEffect(()=>{if(!c.current)return;const g=new CS.Terminal({fontFamily:'"JetBrains Mono", monospace',fontSize:13,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff",cursorAccent:"#1a1a1a"},cursorBlink:!0,cursorStyle:"bar",convertEol:!0}),m=new jS;g.loadAddon(m),p.current={term:g,fitAddon:m},c.current.addEventListener("keydown",C=>{(C.key==="²"||C.key==="`")&&i&&(C.preventDefault(),C.stopPropagation(),i())}),g.open(c.current);const v=c.current.querySelector(".xterm");v&&(v.style.padding="8px"),m.fit(),s&&setTimeout(()=>{g.focus()},150);const S=new ResizeObserver(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{requestAnimationFrame(()=>{var b;m.fit&&m.fit();const C=(b=p.current)==null?void 0:b.term;C&&C.cols>0&&C.rows>0&&f(u.current,C.cols,C.rows)})},100)});S.observe(c.current),g.onData(C=>{if((C==="\x1B"||C==="²"||C==="`")&&i){i();return}h(u.current,C)}),g.onKey(C=>{(C.key==="\x1B"||C.key==="²"||C.key==="`")&&i&&(C.domEvent.stopPropagation(),i())});const E=Ht.subscribe(C=>{var b,y;if(C.type==="terminal.output"&&((b=C.payload)==null?void 0:b.sessionId)===u.current){const x=(y=C.payload)==null?void 0:y.data;x&&g.write(x)}});return()=>{E(),S.disconnect(),l.current&&clearTimeout(l.current),g.dispose(),p.current=null}},[e,h,f]),o.jsxs("div",{className:"flex flex-col h-full bg-[#1a1a1a]",children:[o.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-2 py-1 bg-[#252525] border-b border-[#333]",children:[o.jsx("div",{}),o.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-[#333] text-[#888] hover:text-[#ccc] transition-colors",title:"Close terminal",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.55.5 0 0 1 0-.708z"})})})]}),o.jsx("div",{ref:c,className:"flex-1 relative overflow-hidden",tabIndex:0,onKeyDown:g=>{(g.key==="²"||g.key==="`")&&i&&(g.preventDefault(),g.stopPropagation(),i())}})]})}function TS(e){return e===1?"grid-cols-1":e===2?"grid-cols-1 lg:grid-cols-2":"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3"}function AS({isOpen:e,onClose:r,onFocusChat:i}){const s=sr(C=>C.createSession),c=sr(C=>C.killSession),u=sr(C=>C.sessions),p=sr(C=>C.setWorkdir),l=sr(C=>C.fetchSessions),h=Ut(C=>C.currentProject),[f,g]=P.useState(!0),m=P.useRef(null),v=P.useRef(!1),S=P.useRef(!1),E=P.useCallback(()=>{r(),i()},[r,i]);return P.useEffect(()=>{h!=null&&h.workdir&&p(h.workdir)},[h==null?void 0:h.workdir,p]),P.useEffect(()=>{e&&(g(!0),l().finally(()=>g(!1)))},[e,l]),P.useEffect(()=>{e&&u.length===0&&!f&&!S.current&&(S.current=!0,s())},[e,u.length,f,s]),P.useEffect(()=>{e?(v.current=!0,setTimeout(()=>{var C;(C=m.current)==null||C.focus(),setTimeout(()=>{v.current=!1},200)},100)):S.current=!1},[e]),P.useEffect(()=>{if(!e)return;const C=b=>{v.current||(b.key==="Escape"||b.key==="²"||b.key==="`")&&(b.preventDefault(),r(),i())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[e,r,i]),e?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-x-0 top-[50vh] bottom-0 z-[100] bg-black/40",style:{pointerEvents:"auto"},onClick:E}),o.jsxs("div",{ref:m,tabIndex:-1,className:"fixed inset-x-0 top-0 z-[100] h-[50vh] bg-bg-primary border-b border-border flex flex-col animate-slide-down outline-none",onClick:C=>C.stopPropagation(),onKeyDown:C=>{(C.key==="Escape"||C.key==="²"||C.key==="`")&&(C.preventDefault(),E())},children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Terminal"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>s(),className:"p-2 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"New terminal",children:o.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})}),o.jsx("button",{onClick:()=>{r(),i()},className:"p-2 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Close (Esc)",children:o.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})]}),o.jsx("div",{className:"flex-1 min-h-0 p-2 overflow-auto",children:f?o.jsx("div",{className:"flex items-center justify-center h-full text-text-muted",children:"Loading..."}):u.length===0?o.jsx("div",{className:"flex items-center justify-center h-full text-text-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-4",children:"No terminal sessions"}),o.jsx("button",{onClick:()=>s(),className:"px-4 py-2 bg-accent-primary/25 text-white rounded hover:bg-accent-primary/40 transition-colors",children:"Create Terminal"})]})}):o.jsx("div",{className:`grid ${TS(u.length)} gap-2 h-full auto-rows-fr`,children:u.map(C=>o.jsx(NS,{sessionId:C.id,onClose:()=>c(C.id),onEscape:E,autoFocus:u.length===1},C.id))})})]})]}):null}function Ka({items:e,trigger:r,minWidth:i="120px"}){const[s,c]=P.useState(!1),[u,p]=P.useState(null),l=P.useRef(null),h=P.useRef(null);P.useEffect(()=>{function v(S){h.current&&!h.current.contains(S.target)&&c(!1)}return s&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[s]);const f=P.useCallback(()=>{if(!l.current)return;const v=l.current.getBoundingClientRect(),S=200,C=window.innerHeight-v.bottom<S;p({top:C?v.top-S-4:v.bottom+4,left:v.left,alignToTop:C})},[]),g=v=>{v.stopPropagation(),s||f(),c(!s)},m=u&&o.jsx("div",{ref:h,"data-testid":"session-dropdown-menu",className:`fixed bg-bg-secondary border border-border rounded shadow-lg z-50 ${u.alignToTop?"mb-1":"mt-1"}`,style:{top:u.top,left:u.left,minWidth:i},children:e.map((v,S)=>{const E=o.jsxs(o.Fragment,{children:[v.icon&&o.jsx("span",{className:"w-4 h-4 flex-shrink-0",children:v.icon}),v.label]});return v.href?o.jsx(Dn,{href:v.href,onClick:C=>{var b;(b=v.onClick)==null||b.call(v,C),c(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-bg-tertiary transition-colors flex items-center gap-2 ${v.danger?"text-accent-error hover:bg-accent-error/10":"text-text-primary"} ${S!==e.length-1?"border-b border-border":""}`,children:E},S):o.jsx("button",{onClick:C=>{var b;(b=v.onClick)==null||b.call(v,C),v.closeOnClick!==!1&&c(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-bg-tertiary transition-colors flex items-center gap-2 ${v.danger?"text-accent-error hover:bg-accent-error/10":"text-text-primary"} ${S!==e.length-1?"border-b border-border":""}`,children:E},S)})});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"relative",children:o.jsx("div",{ref:l,onClick:g,children:r})}),s&&Hl.createPortal(m,document.body)]})}function ub(e){const r=new Date(e),s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][r.getDay()],c=r.getFullYear(),u=String(r.getMonth()+1).padStart(2,"0"),p=String(r.getDate()).padStart(2,"0");return`${s} ${c}/${u}/${p}`}function gh(e){const r=new Date(e),i=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0");return`${i}:${s}`}function DS(e){const r=new Date(e),i=new Date,s=new Date(i.getFullYear(),i.getMonth(),i.getDate()),c=new Date(r.getFullYear(),r.getMonth(),r.getDate()),u=Math.floor((s.getTime()-c.getTime())/(1e3*60*60*24)),p=gh(e);if(u===0)return`today ${p}`;if(u===1)return`yesterday ${p}`;if(u<7)return`${u} days ago ${p}`;{const l=r.getFullYear(),h=String(r.getMonth()+1).padStart(2,"0"),f=String(r.getDate()).padStart(2,"0");return`${l}/${h}/${f} ${p}`}}function LS(e){const r=new Date(e),i=r.getFullYear(),s=String(r.getMonth()+1).padStart(2,"0"),c=String(r.getDate()).padStart(2,"0");return`${i}-${s}-${c}`}function db(e){const r=new Map;for(const c of e){const u=LS(c.updatedAt);r.has(u)||r.set(u,[]),r.get(u).push(c)}for(const[c,u]of r)u.sort((p,l)=>{const h=new Date(p.updatedAt).getTime();return new Date(l.updatedAt).getTime()-h});const i=Array.from(r.keys()).sort((c,u)=>u.localeCompare(c)),s=new Map;for(const c of i)s.set(c,r.get(c));return s}function RS({projects:e,currentProject:r}){const i=Ut(u=>u.loadProject),c=[...e].sort((u,p)=>u.name.localeCompare(p.name)).map(u=>({label:u.name,icon:u.id===r.id?o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,href:`/p/${u.id}`,onClick:()=>{i(u.id)}}));return o.jsx(Ka,{items:c,trigger:o.jsxs("button",{className:"text-text-secondary hover:text-text-primary hover:underline text-sm truncate flex items-center gap-1",title:r.name,children:[r.name,o.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),minWidth:"250px"})}function MS({currentProject:e,sessions:r,currentSession:i,projectIdFromUrl:s}){const[c,u]=P.useState(!1),p=P.useRef(null);if(P.useEffect(()=>{function f(g){p.current&&!p.current.contains(g.target)&&u(!1)}if(c)return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[c]),!(e!=null&&e.id)||e.id!==s)return null;const l=r.filter(f=>f.projectId===e.id).sort((f,g)=>new Date(g.updatedAt).getTime()-new Date(f.updatedAt).getTime()).slice(0,5),h=[];h.push({label:o.jsxs(Dn,{href:`/p/${e.id}/new`,className:"flex items-center gap-2",children:[o.jsx("svg",{className:"w-3 h-3 text-accent-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),o.jsx("span",{className:"text-sm",children:"New Session"})]}),onClick:()=>{}});for(const f of l)h.push({label:o.jsx(Dn,{href:`/p/${e.id}/s/${f.id}`,className:"flex items-center gap-2 truncate text-sm",children:o.jsx("span",{children:f.title??f.id.slice(0,8)})}),icon:f.id===(i==null?void 0:i.id)?o.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,onClick:()=>{}});return h.push({label:o.jsxs(Dn,{href:"/",className:"flex items-center gap-2 text-text-muted hover:text-text-primary",children:[o.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),o.jsx("span",{className:"text-sm",children:"Projects"})]}),onClick:()=>{}}),o.jsxs("div",{className:"relative",ref:p,children:[o.jsxs("button",{type:"button",onClick:()=>u(!c),className:"flex items-center gap-1 px-1.5 py-0.5 rounded hover:bg-bg-tertiary transition-colors",children:[o.jsx("span",{className:"text-sm text-text-secondary font-medium",children:e==null?void 0:e.name}),o.jsx("svg",{className:"w-3 h-3 text-text-muted flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),c&&h.length>0&&o.jsx("div",{className:"absolute top-full left-0 mt-1 w-56 bg-bg-secondary border border-border rounded-lg shadow-lg overflow-hidden z-50",children:h.map((f,g)=>{if(f.label&&typeof f.label=="object"&&f.label.type===Dn){const m=f.label,v=m.props.href||"";return o.jsxs(Dn,{href:v,className:"flex items-center gap-2 px-3 py-2 text-sm border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,m.props.children]},g)}return f.href?o.jsxs("a",{href:f.href,className:"flex items-center gap-2 px-3 py-2 text-sm border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,f.label]},g):o.jsxs("button",{type:"button",onClick:()=>{var m;(m=f.onClick)==null||m.call(f),u(!1)},className:"flex items-center gap-2 px-3 py-2 text-sm w-full text-left border-b border-border hover:bg-bg-tertiary transition-colors",children:[f.icon,f.label]},g)})})]})}function OS({sessions:e,currentProject:r,currentSession:i}){var h;const s=Ce(f=>f.loadSession),c=e.filter(f=>f.projectId===r.id).slice(0,15),u=db(c),p=[];p.push({label:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("svg",{className:"w-4 h-4 text-accent-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),o.jsx("span",{className:"text-sm",children:"New session"})]}),href:`/p/${r.id}/new`,onClick:()=>{}});for(const[f,g]of u){const m=g[0];if(m){p.push({label:o.jsx("div",{className:"px-3 py-2 text-text-muted text-xs font-medium cursor-default",children:ub(m.updatedAt)}),onClick:()=>{}});for(const v of g)p.push({label:o.jsxs("div",{className:"min-w-[160px]",children:[o.jsx("div",{className:"truncate text-sm",children:v.title??v.id.slice(0,8)}),o.jsx("div",{className:"text-text-muted text-xs",children:gh(v.updatedAt)})]}),icon:v.id===(i==null?void 0:i.id)?o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):void 0,href:`/p/${r.id}/s/${v.id}`,onClick:()=>{s(v.id)}})}}const l=i?((h=i.metadata)==null?void 0:h.title)??i.id.slice(0,8):"No session selected";return o.jsx(Ka,{items:p,trigger:o.jsxs("button",{className:"text-text-secondary hover:text-text-primary hover:underline text-sm truncate flex items-center gap-1",title:l,"data-testid":"header-session-dropdown",children:[l,o.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),minWidth:"280px"})}function IS({onMenuClick:e,onCriteriaToggle:r}){const[i,s]=P.useState(!1),[c]=ar(),u=c.startsWith("/p/"),p=/^\/p\/[^/]+\/s\/[^/]+$/.test(c),l=Ce(b=>b.currentSession),h=Ce(b=>b.sessions),f=Ut(b=>b.currentProject),g=Ut(b=>b.projects),m=jt(b=>b.startAutoRefresh),v=jt(b=>b.stopAutoRefresh),S=sr(b=>b.setOpen),E=sr(b=>b.isOpen),C=P.useCallback(()=>{const b=document.querySelector('textarea[placeholder*="What would you like to build"], textarea[placeholder*="Send a message"]');b&&b.focus()},[]);return P.useEffect(()=>{const b=y=>{(y.key==="²"||y.key==="`")&&(y.preventDefault(),E||S(!0))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[E,S]),P.useEffect(()=>(m(),()=>v()),[m,v]),o.jsxs("header",{className:"h-8 bg-bg-secondary border-b border-border flex items-center justify-between px-2",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e&&u&&o.jsx("button",{onClick:e,className:"flex-shrink-0 p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Toggle session list",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),o.jsx(Dn,{href:"/",className:"text-accent-primary font-semibold text-base hover:underline flex-shrink-0 hidden md:inline",children:"OpenFox"}),f&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"hidden md:inline text-text-muted flex-shrink-0",children:"/"}),o.jsx("span",{className:"hidden md:inline",children:o.jsx(RS,{projects:g,currentProject:f})}),o.jsx("span",{className:"md:hidden",children:o.jsx(MS,{currentProject:f,sessions:h,currentSession:l,projectIdFromUrl:u&&c.split("/")[2]||null},f==null?void 0:f.id)}),o.jsx("span",{className:"hidden md:inline text-text-muted flex-shrink-0",children:"/"}),o.jsx("span",{className:"hidden md:inline",children:o.jsx(OS,{sessions:h,currentProject:f,currentSession:l})})]})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[u&&o.jsx("button",{onClick:()=>S(!E),className:`p-2.5 rounded hover:bg-bg-tertiary transition-colors ${E?"text-accent-primary":"text-text-muted hover:text-text-primary"}`,title:"Toggle terminal (²)",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:o.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3 1h10v1H5V6zm10 7H5v1h10v-1zm-10 2H5v1h10v-1z",clipRule:"evenodd"})})}),o.jsx("button",{onClick:()=>s(!0),className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Settings",children:o.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),o.jsx("button",{onClick:()=>{localStorage.removeItem("openfox_token"),window.location.reload()},className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Logout",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})})}),r&&p&&o.jsx("button",{onClick:r,className:"p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Toggle summary sidebar",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]}),o.jsx(yS,{isOpen:i,onClose:()=>s(!1)}),o.jsx(AS,{isOpen:E,onClose:()=>S(!1),onFocusChat:C})]})}function BS({isOpen:e,onClose:r,title:i,label:s,description:c,placeholder:u,value:p,isLoading:l=!1,onSave:h}){const[f,g]=P.useState(p),[m,v]=P.useState(!1),[S,E]=P.useState(!1);P.useEffect(()=>{g(p),v(!1)},[p]);const C=_=>{g(_.target.value),v(!0)},b=async()=>{E(!0),await h(f),E(!1),v(!1),r()},y=()=>{g(p),v(!1),r()},x=l||S;return o.jsx(dn,{isOpen:e,onClose:y,title:i,size:"lg",children:o.jsxs("div",{className:"flex flex-col h-full -mt-1",children:[o.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1 flex-shrink-0",children:s}),o.jsx("p",{className:"text-sm text-text-muted mb-3 flex-shrink-0",children:c}),o.jsx("div",{className:"flex-1 min-h-[150px]",children:o.jsx("textarea",{value:f,onChange:C,placeholder:u,className:"w-full h-full px-3 py-2 bg-bg-tertiary border border-border rounded text-sm font-mono resize-none focus:outline-none focus:ring-1 focus:ring-accent-primary",disabled:x})}),o.jsxs("div",{className:"flex justify-end gap-2 pt-2 mt-3 border-t border-border flex-shrink-0",children:[o.jsx(dt,{variant:"secondary",onClick:y,children:"Cancel"}),o.jsx(dt,{variant:"primary",onClick:b,disabled:!m||x,children:S?"Saving...":"Save"})]})]})})}function zS({isOpen:e,onClose:r,project:i}){const s=Ut(u=>u.updateProject),c=async u=>{s(i.id,{customInstructions:u||null}),await new Promise(p=>setTimeout(p,100))};return o.jsx(BS,{isOpen:e,onClose:r,title:`${i.name} Settings`,label:"Project Instructions",description:"These instructions are injected into prompts when working in this project. They are applied after global instructions but before AGENTS.md files.",placeholder:"Enter project-specific instructions...",value:i.customInstructions??"",onSave:c})}function hb({projectId:e,isOpen:r=!0,onClose:i}){const[,s]=ar(),[c,u]=P.useState(!1),p=Ce(j=>j.sessions),l=Ce(j=>j.currentSession),h=Ce(j=>j.unreadSessionIds),f=Ce(j=>j.deleteSession),g=Ce(j=>j.deleteAllSessions),m=Ce(j=>j.loadMoreSessions),v=Ce(j=>j.sessionsHasMore),S=Ce(j=>j.sessionsPaginationLoading),E=Ut(j=>j.currentProject),C=P.useRef(null),b=P.useCallback(()=>{v&&!S&&E&&m(E.id)},[v,S,E,m]);P.useEffect(()=>{if(!C.current||!v)return;const j=new IntersectionObserver(A=>{const N=A[0];N&&N.isIntersecting&&b()},{threshold:.1});return j.observe(C.current),()=>j.disconnect()},[v,b]);const y=p.filter(j=>j.projectId===(E==null?void 0:E.id)),x=(j,A)=>{A==null||A.stopPropagation(),confirm("Delete this session?")&&(f(j),(l==null?void 0:l.id)===j&&s(`/p/${e}`))},_=()=>{confirm("Delete all sessions in this project? This cannot be undone.")&&(g(e),s(`/p/${e}`))};return o.jsxs(o.Fragment,{children:[r&&i&&o.jsx("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:i}),o.jsxs("aside",{className:`
|
|
77
77
|
${r?"md:w-[300px] md:shrink-0":"md:w-0 md:shrink-0 md:overflow-hidden"}
|
|
78
78
|
md:relative md:h-auto md:translate-x-0
|
|
79
79
|
|
package/dist/web/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/assets/openfox.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>OpenFox</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Ccy2Csbl.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-MCWDS5UQ.css">
|
|
10
10
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
11
11
|
<body class="bg-bg-primary text-text-primary font-mono">
|
package/dist/web/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),c={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map(e=>c[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"
|
|
1
|
+
if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),c={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map(e=>c[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"cce0b9f2c99f56c1a8b558740d2c8a00"},{url:"assets/index-MCWDS5UQ.css",revision:null},{url:"assets/index-Ccy2Csbl.js",revision:null},{url:"assets/html2canvas.esm-QH1iLAAe.js",revision:null},{url:"assets/openfox-192.png",revision:"79feeb86d692c274854e37959a7dae67"},{url:"assets/openfox-512.png",revision:"fee24b214220594b4f595a467e73036e"},{url:"manifest.webmanifest",revision:"c25f372c782e623ab1e768a8dfe350ca"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openfox",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"description": "Local-LLM-first agentic coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"react-syntax-highlighter": "^16.1.1",
|
|
71
71
|
"remark-gfm": "^4.0.1",
|
|
72
72
|
"sql-language-server": "^1.7.1",
|
|
73
|
+
"strip-ansi": "^7.2.0",
|
|
73
74
|
"turndown": "^7.2.2",
|
|
74
75
|
"typescript": "^5.8.2",
|
|
75
76
|
"typescript-language-server": "^5.1.3",
|