openfox 1.6.52 → 1.6.54
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/{auto-compaction-43QXHIOZ.js → auto-compaction-JJEWRJWV.js} +4 -4
- package/dist/{chat-handler-UMXEBSMS.js → chat-handler-KVS36WQL.js} +9 -11
- package/dist/{chunk-BMNBXLFY.js → chunk-2W3U4KL3.js} +96 -524
- package/dist/{chunk-H5ZZGLQU.js → chunk-CTAIXOZJ.js} +1 -1
- package/dist/{chunk-XKI3OYFD.js → chunk-ERSDTWU2.js} +2 -2
- package/dist/{chunk-OPT4YF7X.js → chunk-GIPCUPTT.js} +38 -3
- package/dist/{chunk-HQSCGJ6V.js → chunk-KFBIHS3S.js} +6 -26
- package/dist/{chunk-PLIGDCWB.js → chunk-RRNFFFN4.js} +2 -2
- package/dist/{chunk-NVWJC2YZ.js → chunk-Y4UE4ZRG.js} +174 -10
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{orchestrator-JSLETK3F.js → orchestrator-TA4MAODB.js} +5 -5
- package/dist/package.json +9 -4
- package/dist/{processor-Q4NS4MID.js → processor-R3FG6O6H.js} +7 -9
- package/dist/{protocol-GG65P3FF.js → protocol-5AWNGFLH.js} +5 -15
- package/dist/{protocol-BWFqvGie.d.ts → protocol-D8pu3Njm.d.ts} +17 -25
- package/dist/{serve-HPBQJTEZ.js → serve-HJQ7FZ3R.js} +6 -7
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +5 -6
- package/dist/server/public/__inspect__.js +235 -0
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/{tools-DTNPLRKJ.js → tools-T2FCQ5FE.js} +4 -4
- package/dist/web/assets/{index-CugBax2x.js → index-DICFgGhL.js} +49 -49
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +9 -4
- package/dist/chunk-2L4DPLCM.js +0 -44
|
@@ -478,8 +478,23 @@ interface Config {
|
|
|
478
478
|
/** Active workflow ID (defaults to "default") */
|
|
479
479
|
activeWorkflowId?: string | undefined;
|
|
480
480
|
}
|
|
481
|
+
interface ElementData {
|
|
482
|
+
tag: string;
|
|
483
|
+
id: string | null;
|
|
484
|
+
className: string | null;
|
|
485
|
+
xpath: string;
|
|
486
|
+
text: string | null;
|
|
487
|
+
outerHTML: string;
|
|
488
|
+
rect: {
|
|
489
|
+
x: number;
|
|
490
|
+
y: number;
|
|
491
|
+
width: number;
|
|
492
|
+
height: number;
|
|
493
|
+
};
|
|
494
|
+
attributes: Record<string, string>;
|
|
495
|
+
}
|
|
481
496
|
|
|
482
|
-
type ClientMessageType = 'session.load' | '
|
|
497
|
+
type ClientMessageType = 'session.load' | 'context.compact' | 'runner.launch' | 'path.confirm' | 'ask.answer';
|
|
483
498
|
interface ClientMessage<T = unknown> {
|
|
484
499
|
id: string;
|
|
485
500
|
type: ClientMessageType;
|
|
@@ -489,29 +504,6 @@ interface SessionLoadPayload {
|
|
|
489
504
|
sessionId: string;
|
|
490
505
|
lastEventSeq?: number;
|
|
491
506
|
}
|
|
492
|
-
interface ChatSendPayload {
|
|
493
|
-
content: string;
|
|
494
|
-
attachments?: Attachment[];
|
|
495
|
-
messageKind?: 'command';
|
|
496
|
-
isSystemGenerated?: boolean;
|
|
497
|
-
}
|
|
498
|
-
interface ModeSwitchPayload {
|
|
499
|
-
mode: SessionMode;
|
|
500
|
-
}
|
|
501
|
-
interface CriteriaEditPayload {
|
|
502
|
-
criteria: Criterion[];
|
|
503
|
-
}
|
|
504
|
-
interface QueueAsapPayload {
|
|
505
|
-
content: string;
|
|
506
|
-
attachments?: Attachment[];
|
|
507
|
-
}
|
|
508
|
-
interface QueueCompletionPayload {
|
|
509
|
-
content: string;
|
|
510
|
-
attachments?: Attachment[];
|
|
511
|
-
}
|
|
512
|
-
interface QueueCancelPayload {
|
|
513
|
-
queueId: string;
|
|
514
|
-
}
|
|
515
507
|
interface AskAnswerPayload {
|
|
516
508
|
callId: string;
|
|
517
509
|
answer: string;
|
|
@@ -845,4 +837,4 @@ interface QueueCancelledEvent {
|
|
|
845
837
|
}
|
|
846
838
|
type QueueEvent = QueueAddedEvent | QueueDrainedEvent | QueueCancelledEvent;
|
|
847
839
|
|
|
848
|
-
export { type
|
|
840
|
+
export { type InjectedFile as $, type AgentEvent as A, type BackgroundProcess as B, type CallStatsDataPoint as C, type ClientMessageType as D, type Config as E, type ContextCompactionEvent as F, type ContextState as G, type ContextStatePayload as H, type ContextWindow as I, type CriteriaUpdatedPayload as J, type Criterion as K, type CriterionAttempt as L, type Message as M, type CriterionStatus as N, type CriterionValidation as O, type DangerLevel as P, type DevServerOutputPayload as Q, type DevServerStatePayload as R, type SessionStats as S, type Diagnostic as T, type EditContextEdit as U, type EditContextLine as V, type EditContextRegion as W, type ElementData as X, type ErrorPayload as Y, type ExecutionState as Z, type FileReadEntry as _, type AskAnswerPayload as a, type LLMCallStats as a0, type LlmBackend as a1, type LogLine as a2, type LspDiagnosticsPayload as a3, type MessageRole as a4, type MessageSegment as a5, type MessageStats as a6, type ModeChangedPayload as a7, type ModelConfig as a8, type ModelSessionStats as a9, type Session as aA, type SessionListPayload as aB, type SessionLoadPayload as aC, type SessionMetadata as aD, type SessionMode as aE, type SessionNameGeneratedPayload as aF, type SessionPhase as aG, type SessionRunningPayload as aH, type SessionStatePayload as aI, type SessionSummary as aJ, type StatsDataPoint as aK, type StatsIdentity as aL, type TaskCompletedPayload as aM, type Todo as aN, type ToolCall as aO, type ToolMode as aP, type ToolName as aQ, type ToolResult as aR, type ValidationResult as aS, createClientMessage as aT, createServerMessage as aU, isClientMessage as aV, isServerMessage as aW, type PathConfirmPayload as aa, type PathConfirmationReason as ab, type PendingPathConfirmationPayload as ac, type PhaseChangedPayload as ad, type PreparingToolCall as ae, type Project as af, type ProjectDeletedPayload as ag, type ProjectListPayload as ah, type ProjectStatePayload as ai, type PromptContext as aj, type PromptContextMessage as ak, type PromptContextTool as al, type PromptRequestOptions as am, type Provider as an, type ProviderBackend as ao, type ProviderChangedPayload as ap, type QueueAddedEvent as aq, type QueueCancelledEvent as ar, type QueueDrainedEvent as as, type QueueEvent as at, type QueueEventType as au, type QueueStatePayload as av, type QueuedMessage as aw, type RecentUserPrompt as ax, type ServerMessage as ay, type ServerMessageType as az, type AskUserEvent as b, type Attachment as c, type BackgroundProcessExitedPayload as d, type BackgroundProcessOutputPayload as e, type BackgroundProcessRemovedPayload as f, type BackgroundProcessStartedPayload as g, type BackgroundProcessStatus as h, type ChatAskUserPayload as i, type ChatDeltaPayload as j, type ChatDonePayload as k, type ChatErrorPayload as l, type ChatFormatRetryPayload as m, type ChatMessagePayload as n, type ChatMessageUpdatedPayload as o, type ChatPathConfirmationPayload as p, type ChatProgressPayload as q, type ChatSummaryPayload as r, type ChatThinkingPayload as s, type ChatTodoPayload as t, type ChatToolCallPayload as u, type ChatToolOutputPayload as v, type ChatToolPreparingPayload as w, type ChatToolResultPayload as x, type ChatVisionFallbackPayload as y, type ClientMessage as z };
|
|
@@ -6,10 +6,9 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
createServer
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-NVWJC2YZ.js";
|
|
9
|
+
} from "./chunk-2W3U4KL3.js";
|
|
10
|
+
import "./chunk-RRNFFFN4.js";
|
|
11
|
+
import "./chunk-Y4UE4ZRG.js";
|
|
13
12
|
import "./chunk-NBU6KIOD.js";
|
|
14
13
|
import "./chunk-574HZVLE.js";
|
|
15
14
|
import "./chunk-7JPKRM6M.js";
|
|
@@ -18,12 +17,12 @@ import "./chunk-F2VWCCMC.js";
|
|
|
18
17
|
import "./chunk-WNZIUQ2L.js";
|
|
19
18
|
import "./chunk-UQGY56XJ.js";
|
|
20
19
|
import "./chunk-LIMBYVO4.js";
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KFBIHS3S.js";
|
|
22
21
|
import "./chunk-22CTURMH.js";
|
|
23
22
|
import "./chunk-GQZGIMJO.js";
|
|
24
23
|
import "./chunk-BLNFJ22S.js";
|
|
25
24
|
import "./chunk-B7E3BICY.js";
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-CTAIXOZJ.js";
|
|
27
26
|
import {
|
|
28
27
|
ensureDataDirExists,
|
|
29
28
|
getDatabasePath,
|
|
@@ -188,4 +187,4 @@ async function runServe(options) {
|
|
|
188
187
|
export {
|
|
189
188
|
runServe
|
|
190
189
|
};
|
|
191
|
-
//# sourceMappingURL=serve-
|
|
190
|
+
//# sourceMappingURL=serve-HJQ7FZ3R.js.map
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aO as ToolCall, c as Attachment, T as Diagnostic, an as Provider, a8 as ModelConfig, aA as Session, aJ as SessionSummary, af as Project, aE as SessionMode, aG as SessionPhase, M as Message, K as Criterion, N as CriterionStatus, aw as QueuedMessage, G as ContextState, P as DangerLevel$1, ay as ServerMessage, aL as StatsIdentity, aR as ToolResult, E as Config } from '../protocol-D8pu3Njm.js';
|
|
2
2
|
import { Server } from 'node:http';
|
|
3
3
|
|
|
4
4
|
interface LLMMessage {
|
package/dist/server/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-NVWJC2YZ.js";
|
|
4
|
+
} from "../chunk-2W3U4KL3.js";
|
|
5
|
+
import "../chunk-RRNFFFN4.js";
|
|
6
|
+
import "../chunk-Y4UE4ZRG.js";
|
|
8
7
|
import "../chunk-NBU6KIOD.js";
|
|
9
8
|
import "../chunk-574HZVLE.js";
|
|
10
9
|
import "../chunk-7JPKRM6M.js";
|
|
@@ -13,12 +12,12 @@ import "../chunk-F2VWCCMC.js";
|
|
|
13
12
|
import "../chunk-WNZIUQ2L.js";
|
|
14
13
|
import "../chunk-UQGY56XJ.js";
|
|
15
14
|
import "../chunk-LIMBYVO4.js";
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-KFBIHS3S.js";
|
|
17
16
|
import "../chunk-22CTURMH.js";
|
|
18
17
|
import "../chunk-GQZGIMJO.js";
|
|
19
18
|
import "../chunk-BLNFJ22S.js";
|
|
20
19
|
import "../chunk-B7E3BICY.js";
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-CTAIXOZJ.js";
|
|
22
21
|
import "../chunk-R4HADRYO.js";
|
|
23
22
|
import "../chunk-TVQOONDR.js";
|
|
24
23
|
import "../chunk-VCALN543.js";
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
window.__foxInspectMode = false;
|
|
5
|
+
window.__foxSessionId = null;
|
|
6
|
+
window.__foxInspectEnabled = true;
|
|
7
|
+
window.__foxSentPending = false;
|
|
8
|
+
|
|
9
|
+
var overlayStyle = document.createElement('style');
|
|
10
|
+
overlayStyle.textContent = [
|
|
11
|
+
'#__fox-overlay{position:fixed;bottom:16px;right:16px;z-index:2147483647;font-family:system-ui,sans-serif;font-size:13px;pointer-events:none}',
|
|
12
|
+
'#__fox-widget{background:#1e1e1e;color:#e0e0e0;padding:8px 12px;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.4);display:flex;align-items:center;gap:10px;pointer-events:auto}',
|
|
13
|
+
'#__fox-widget .__fox-label{font-size:12px;font-weight:500;color:#888}',
|
|
14
|
+
'#__fox-toggle{background:#3b82f6;color:#fff;border:none;padding:4px 10px;border-radius:4px;cursor:pointer;font-size:12px;font-family:inherit}',
|
|
15
|
+
'#__fox-toggle:hover{background:#2563eb}',
|
|
16
|
+
'#__fox-toggle.__fox-active{background:#ef4444}',
|
|
17
|
+
'#__fox-toggle.__fox-active:hover{background:#dc2626}',
|
|
18
|
+
'.__fox-highlight{outline:2px solid #3b82f6!important;outline-offset:1px!important}',
|
|
19
|
+
'#__fox-popup{position:fixed;background:#1e1e1e;color:#e0e0e0;padding:12px;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.5);z-index:2147483647;min-width:300px;max-width:400px;pointer-events:auto;font-family:system-ui,sans-serif}',
|
|
20
|
+
'#__fox-popup .__fox-selector{font-family:monospace;font-size:11px;color:#888;background:#2a2a2a;padding:4px 8px;border-radius:4px;word-break:break-all;margin-bottom:8px;max-height:80px;overflow:auto}',
|
|
21
|
+
'#__fox-popup .__fox-tag{font-size:12px;color:#aaa;margin-bottom:8px}',
|
|
22
|
+
'#__fox-popup .__fox-tag span{color:#3b82f6}',
|
|
23
|
+
'#__fox-popup textarea{width:100%;background:#2a2a2a;color:#e0e0e0;border:1px solid #444;border-radius:4px;padding:6px 8px;font-size:12px;resize:vertical;min-height:60px;box-sizing:border-box;font-family:inherit}',
|
|
24
|
+
'#__fox-popup textarea:focus{border-color:#3b82f6;outline:none}',
|
|
25
|
+
'#__fox-popup .__fox-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}',
|
|
26
|
+
'#__fox-popup button.__fox-send{background:#3b82f6;color:#fff;border:none;padding:6px 14px;border-radius:4px;cursor:pointer;font-size:12px;font-family:inherit}',
|
|
27
|
+
'#__fox-popup button.__fox-send:hover{background:#2563eb}',
|
|
28
|
+
'#__fox-popup button.__fox-cancel{background:transparent;color:#888;border:1px solid #444;padding:6px 14px;border-radius:4px;cursor:pointer;font-size:12px;font-family:inherit}',
|
|
29
|
+
'#__fox-popup button.__fox-cancel:hover{color:#aaa;border-color:#666}'
|
|
30
|
+
].join('\n');
|
|
31
|
+
|
|
32
|
+
var overlay = document.createElement('div');
|
|
33
|
+
overlay.id = '__fox-overlay';
|
|
34
|
+
overlay.innerHTML = '<div id="__fox-widget">' +
|
|
35
|
+
'<span class="__fox-label">OpenFox</span>' +
|
|
36
|
+
'<button id="__fox-toggle">Send feedback</button>' +
|
|
37
|
+
'</div>';
|
|
38
|
+
|
|
39
|
+
var toggleBtn;
|
|
40
|
+
|
|
41
|
+
function setInspectMode(enabled) {
|
|
42
|
+
window.__foxInspectMode = enabled;
|
|
43
|
+
if (toggleBtn) {
|
|
44
|
+
toggleBtn.textContent = enabled ? 'Exit inspect' : 'Send feedback';
|
|
45
|
+
toggleBtn.classList.toggle('__fox-active', enabled);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function generateXPath(el) {
|
|
50
|
+
if (!el || el.nodeType !== Node.ELEMENT_NODE) return '';
|
|
51
|
+
var parts = [];
|
|
52
|
+
while (el && el.nodeType === Node.ELEMENT_NODE && el !== document.documentElement) {
|
|
53
|
+
var index = 1;
|
|
54
|
+
var sibling = el.previousSibling;
|
|
55
|
+
while (sibling) {
|
|
56
|
+
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === el.nodeName) index++;
|
|
57
|
+
sibling = sibling.previousSibling;
|
|
58
|
+
}
|
|
59
|
+
parts.unshift(el.nodeName.toLowerCase() + '[' + index + ']');
|
|
60
|
+
el = el.parentNode;
|
|
61
|
+
}
|
|
62
|
+
return '/' + parts.join('/');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function buildElementData(el) {
|
|
66
|
+
var attrs = {};
|
|
67
|
+
if (el.attributes) {
|
|
68
|
+
for (var i = 0; i < el.attributes.length; i++) {
|
|
69
|
+
var attr = el.attributes[i];
|
|
70
|
+
if (attr.name !== 'class' && attr.name !== 'id') {
|
|
71
|
+
attrs[attr.name] = attr.value;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
var rect = el.getBoundingClientRect();
|
|
76
|
+
var tagName = el.tagName ? el.tagName.toLowerCase() : '';
|
|
77
|
+
// Avoid capturing the highlight overlay in xpath/outerHTML
|
|
78
|
+
if (el.classList && el.classList.contains('__fox-highlight')) {
|
|
79
|
+
var parent = el.parentNode;
|
|
80
|
+
if (parent) {
|
|
81
|
+
return buildElementData(parent);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
tag: tagName,
|
|
86
|
+
id: el.id || null,
|
|
87
|
+
className: (typeof el.className === 'string' ? el.className : '') || null,
|
|
88
|
+
xpath: generateXPath(el),
|
|
89
|
+
text: (el.innerText || '').slice(0, 500) || null,
|
|
90
|
+
outerHTML: (el.outerHTML || '').slice(0, 1000) || '',
|
|
91
|
+
rect: { x: rect.left, y: rect.top, width: rect.width, height: rect.height },
|
|
92
|
+
attributes: attrs
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function showPopup(el, x, y) {
|
|
97
|
+
var existing = document.getElementById('__fox-popup');
|
|
98
|
+
if (existing) existing.remove();
|
|
99
|
+
|
|
100
|
+
var data = buildElementData(el);
|
|
101
|
+
var viewportWidth = window.innerWidth;
|
|
102
|
+
var viewportHeight = window.innerHeight;
|
|
103
|
+
|
|
104
|
+
var left = x + 10;
|
|
105
|
+
var top = y + 10;
|
|
106
|
+
if (left + 340 > viewportWidth) left = x - 350;
|
|
107
|
+
if (top + 280 > viewportHeight) top = y - 290;
|
|
108
|
+
if (left < 8) left = 8;
|
|
109
|
+
if (top < 8) top = 8;
|
|
110
|
+
|
|
111
|
+
var popup = document.createElement('div');
|
|
112
|
+
popup.id = '__fox-popup';
|
|
113
|
+
popup.style.left = left + 'px';
|
|
114
|
+
popup.style.top = top + 'px';
|
|
115
|
+
|
|
116
|
+
var tagDisplay = data.tag + (data.id ? '#' + data.id : (data.className ? '.' + data.className.split(' ')[0] : ''));
|
|
117
|
+
|
|
118
|
+
popup.innerHTML =
|
|
119
|
+
'<div class="__fox-tag">Element: <span>' + tagDisplay + '</span></div>' +
|
|
120
|
+
'<div class="__fox-selector">' + data.xpath + '</div>' +
|
|
121
|
+
'<textarea placeholder="What\'s wrong with this element?"></textarea>' +
|
|
122
|
+
'<div class="__fox-actions">' +
|
|
123
|
+
'<button class="__fox-cancel">Cancel</button>' +
|
|
124
|
+
'<button class="__fox-send">Send to Agent</button>' +
|
|
125
|
+
'</div>';
|
|
126
|
+
|
|
127
|
+
document.body.appendChild(popup);
|
|
128
|
+
|
|
129
|
+
var textarea = popup.querySelector('textarea');
|
|
130
|
+
textarea.focus();
|
|
131
|
+
|
|
132
|
+
textarea.addEventListener('keydown', function(ke) {
|
|
133
|
+
if (ke.key === 'Enter' && !ke.shiftKey) {
|
|
134
|
+
ke.preventDefault();
|
|
135
|
+
popup.querySelector('.__fox-send').click();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
popup.querySelector('.__fox-cancel').addEventListener('click', function(e) {
|
|
140
|
+
e.stopPropagation();
|
|
141
|
+
popup.remove();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
popup.querySelector('.__fox-send').addEventListener('click', function(e) {
|
|
145
|
+
e.stopPropagation();
|
|
146
|
+
if (window.__foxSentPending) return;
|
|
147
|
+
window.__foxSentPending = true;
|
|
148
|
+
setTimeout(function() { window.__foxSentPending = false; }, 3000);
|
|
149
|
+
var annotation = textarea.value.trim();
|
|
150
|
+
popup.remove();
|
|
151
|
+
setInspectMode(false);
|
|
152
|
+
|
|
153
|
+
fetch('/__openfox_feedback', {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
headers: { 'Content-Type': 'application/json' },
|
|
156
|
+
body: JSON.stringify({
|
|
157
|
+
sessionId: window.__foxSessionId,
|
|
158
|
+
element: data,
|
|
159
|
+
annotation: annotation,
|
|
160
|
+
pageUrl: window.location.href
|
|
161
|
+
})
|
|
162
|
+
}).catch(function(err) {
|
|
163
|
+
console.error('Failed to send feedback:', err);
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
popup.addEventListener('click', function(e) { e.stopPropagation(); });
|
|
168
|
+
|
|
169
|
+
document.addEventListener('keydown', function escHandler(e) {
|
|
170
|
+
if (e.key === 'Escape') {
|
|
171
|
+
popup.remove();
|
|
172
|
+
document.removeEventListener('keydown', escHandler);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
document.addEventListener('mouseover', function(e) {
|
|
178
|
+
if (!window.__foxInspectMode) return;
|
|
179
|
+
if (e.target === document.documentElement || e.target === document.body) return;
|
|
180
|
+
if (overlay.contains(e.target)) return;
|
|
181
|
+
e.target.classList.add('__fox-highlight');
|
|
182
|
+
}, true);
|
|
183
|
+
|
|
184
|
+
document.addEventListener('mouseout', function(e) {
|
|
185
|
+
if (!window.__foxInspectMode) return;
|
|
186
|
+
if (e.target === document.documentElement || e.target === document.body) return;
|
|
187
|
+
if (overlay.contains(e.target)) return;
|
|
188
|
+
e.target.classList.remove('__fox-highlight');
|
|
189
|
+
}, true);
|
|
190
|
+
|
|
191
|
+
document.addEventListener('click', function(e) {
|
|
192
|
+
if (!window.__foxInspectMode) return;
|
|
193
|
+
if (overlay.contains(e.target)) return;
|
|
194
|
+
if (document.getElementById('__fox-popup')) return;
|
|
195
|
+
|
|
196
|
+
e.preventDefault();
|
|
197
|
+
e.stopPropagation();
|
|
198
|
+
showPopup(e.target, e.clientX, e.clientY);
|
|
199
|
+
}, true);
|
|
200
|
+
|
|
201
|
+
document.addEventListener('keydown', function(e) {
|
|
202
|
+
if (e.key === 'Escape' && window.__foxInspectMode) {
|
|
203
|
+
setInspectMode(false);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
window.addEventListener('message', function(e) {
|
|
208
|
+
if (e.data && e.data.type === 'setFoxSessionId') {
|
|
209
|
+
window.__foxSessionId = e.data.sessionId;
|
|
210
|
+
}
|
|
211
|
+
if (e.data && e.data.type === 'setFoxInspectEnabled') {
|
|
212
|
+
window.__foxInspectEnabled = e.data.enabled;
|
|
213
|
+
overlay.style.display = e.data.enabled ? '' : 'none';
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
function init() {
|
|
218
|
+
if (window.__foxInspectInit) return;
|
|
219
|
+
window.__foxInspectInit = true;
|
|
220
|
+
document.head.appendChild(overlayStyle);
|
|
221
|
+
document.body.appendChild(overlay);
|
|
222
|
+
toggleBtn = document.getElementById('__fox-toggle');
|
|
223
|
+
toggleBtn.addEventListener('click', function(e) {
|
|
224
|
+
e.stopPropagation();
|
|
225
|
+
setInspectMode(!window.__foxInspectMode);
|
|
226
|
+
});
|
|
227
|
+
overlay.style.display = window.__foxInspectEnabled ? '' : 'none';
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (document.body) {
|
|
231
|
+
init();
|
|
232
|
+
} else {
|
|
233
|
+
document.addEventListener('DOMContentLoaded', init);
|
|
234
|
+
}
|
|
235
|
+
})();
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Message, S as SessionStats } from '../protocol-
|
|
2
|
-
export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, c as Attachment, B as BackgroundProcess, d as BackgroundProcessExitedPayload, e as BackgroundProcessOutputPayload, f as BackgroundProcessRemovedPayload, g as BackgroundProcessStartedPayload, h as BackgroundProcessStatus, C as CallStatsDataPoint, i as ChatAskUserPayload, j as ChatDeltaPayload, k as ChatDonePayload, l as ChatErrorPayload, m as ChatFormatRetryPayload, n as ChatMessagePayload, o as ChatMessageUpdatedPayload, p as ChatPathConfirmationPayload, q as ChatProgressPayload, r as
|
|
1
|
+
import { M as Message, S as SessionStats } from '../protocol-D8pu3Njm.js';
|
|
2
|
+
export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, c as Attachment, B as BackgroundProcess, d as BackgroundProcessExitedPayload, e as BackgroundProcessOutputPayload, f as BackgroundProcessRemovedPayload, g as BackgroundProcessStartedPayload, h as BackgroundProcessStatus, C as CallStatsDataPoint, i as ChatAskUserPayload, j as ChatDeltaPayload, k as ChatDonePayload, l as ChatErrorPayload, m as ChatFormatRetryPayload, n as ChatMessagePayload, o as ChatMessageUpdatedPayload, p as ChatPathConfirmationPayload, q as ChatProgressPayload, r as ChatSummaryPayload, s as ChatThinkingPayload, t as ChatTodoPayload, u as ChatToolCallPayload, v as ChatToolOutputPayload, w as ChatToolPreparingPayload, x as ChatToolResultPayload, y as ChatVisionFallbackPayload, z as ClientMessage, D as ClientMessageType, E as Config, F as ContextCompactionEvent, G as ContextState, H as ContextStatePayload, I as ContextWindow, J as CriteriaUpdatedPayload, K as Criterion, L as CriterionAttempt, N as CriterionStatus, O as CriterionValidation, P as DangerLevel, Q as DevServerOutputPayload, R as DevServerStatePayload, T as Diagnostic, U as EditContextEdit, V as EditContextLine, W as EditContextRegion, X as ElementData, Y as ErrorPayload, Z as ExecutionState, _ as FileReadEntry, $ as InjectedFile, a0 as LLMCallStats, a1 as LlmBackend, a2 as LogLine, a3 as LspDiagnosticsPayload, a4 as MessageRole, a5 as MessageSegment, a6 as MessageStats, a7 as ModeChangedPayload, a8 as ModelConfig, a9 as ModelSessionStats, aa as PathConfirmPayload, ab as PathConfirmationReason, ac as PendingPathConfirmationPayload, ad as PhaseChangedPayload, ae as PreparingToolCall, af as Project, ag as ProjectDeletedPayload, ah as ProjectListPayload, ai as ProjectStatePayload, aj as PromptContext, ak as PromptContextMessage, al as PromptContextTool, am as PromptRequestOptions, an as Provider, ao as ProviderBackend, ap as ProviderChangedPayload, aq as QueueAddedEvent, ar as QueueCancelledEvent, as as QueueDrainedEvent, at as QueueEvent, au as QueueEventType, av as QueueStatePayload, aw as QueuedMessage, ax as RecentUserPrompt, ay as ServerMessage, az as ServerMessageType, aA as Session, aB as SessionListPayload, aC as SessionLoadPayload, aD as SessionMetadata, aE as SessionMode, aF as SessionNameGeneratedPayload, aG as SessionPhase, aH as SessionRunningPayload, aI as SessionStatePayload, aJ as SessionSummary, aK as StatsDataPoint, aL as StatsIdentity, aM as TaskCompletedPayload, aN as Todo, aO as ToolCall, aP as ToolMode, aQ as ToolName, aR as ToolResult, aS as ValidationResult, aT as createClientMessage, aU as createServerMessage, aV as isClientMessage, aW as isServerMessage } from '../protocol-D8pu3Njm.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Session stats computation - aggregates response-level MessageStats from
|
package/dist/shared/index.js
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y4UE4ZRG.js";
|
|
15
15
|
import "./chunk-NBU6KIOD.js";
|
|
16
16
|
import "./chunk-574HZVLE.js";
|
|
17
17
|
import "./chunk-7JPKRM6M.js";
|
|
18
18
|
import "./chunk-WNZIUQ2L.js";
|
|
19
19
|
import "./chunk-UQGY56XJ.js";
|
|
20
20
|
import "./chunk-LIMBYVO4.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-KFBIHS3S.js";
|
|
22
22
|
import {
|
|
23
23
|
AskUserInterrupt,
|
|
24
24
|
cancelQuestionsForSession,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-22CTURMH.js";
|
|
27
27
|
import "./chunk-GQZGIMJO.js";
|
|
28
28
|
import "./chunk-BLNFJ22S.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CTAIXOZJ.js";
|
|
30
30
|
import "./chunk-R4HADRYO.js";
|
|
31
31
|
import "./chunk-TVQOONDR.js";
|
|
32
32
|
import "./chunk-VCALN543.js";
|
|
@@ -48,4 +48,4 @@ export {
|
|
|
48
48
|
stepDoneTool,
|
|
49
49
|
validateToolAction
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=tools-
|
|
51
|
+
//# sourceMappingURL=tools-T2FCQ5FE.js.map
|