openfox 1.6.76 → 1.6.77
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/README.md +18 -18
- package/dist/agent-defaults/code-reviewer.agent.md +1 -0
- package/dist/agent-defaults/explorer.agent.md +2 -1
- package/dist/agent-defaults/verifier.agent.md +4 -0
- package/dist/{auto-compaction-V3PA77WG.js → auto-compaction-GOHNI2R2.js} +4 -4
- package/dist/{chat-handler-7DKHGTVO.js → chat-handler-K2RDXBO6.js} +7 -7
- package/dist/{chunk-NHJ2GVCF.js → chunk-6SYNGMU4.js} +4 -4
- package/dist/{chunk-VAMTEAYI.js → chunk-BBC46FN4.js} +13 -2
- package/dist/{chunk-H5EICXF3.js → chunk-EBQYRNNU.js} +45 -23
- package/dist/{chunk-LCQ3MPXD.js → chunk-I7JVS7V5.js} +3 -3
- package/dist/{chunk-RQ4XSKUR.js → chunk-OJBFC6ER.js} +2 -2
- package/dist/{chunk-5ZD3GZTK.js → chunk-UVN6AKIO.js} +2 -2
- package/dist/{chunk-K2V7EW5F.js → chunk-XSUQDB6R.js} +21 -21
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-BDXQOC7F.js → events-5RIXWI5Y.js} +3 -3
- package/dist/{folding-2HW7FIKL.js → folding-JNOUTI5Z.js} +2 -2
- package/dist/{orchestrator-KCHEENHK.js → orchestrator-TW5II347.js} +5 -5
- package/dist/package.json +1 -1
- package/dist/{processor-6TS37IYH.js → processor-MZ3QIUED.js} +5 -5
- package/dist/{serve-OLDABBV3.js → serve-FTTLGRAO.js} +6 -6
- package/dist/server/index.js +5 -5
- package/dist/server/public/__inspect__.js +161 -142
- package/dist/{tools-BHYHS3RY.js → tools-QJ5K5IJP.js} +4 -4
- package/dist/web/__inspect__.js +178 -155
- package/dist/web/assets/{index-DAuZ02-Q.js → index-FjLp1t6r.js} +65 -65
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I7JVS7V5.js";
|
|
9
9
|
import {
|
|
10
10
|
getEventStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UVN6AKIO.js";
|
|
12
12
|
import "./chunk-KIOUKC3Z.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-BBC46FN4.js";
|
|
14
14
|
import {
|
|
15
15
|
createChatMessageMessage,
|
|
16
16
|
createSessionRunningMessage
|
|
@@ -177,7 +177,7 @@ var QueueProcessor = class {
|
|
|
177
177
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
178
178
|
model: llmClient.getModel()
|
|
179
179
|
};
|
|
180
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
180
|
+
const { runChatTurn } = await import("./orchestrator-TW5II347.js");
|
|
181
181
|
const runChatTurnParams = buildRunChatTurnParams({
|
|
182
182
|
sessionManager,
|
|
183
183
|
sessionId,
|
|
@@ -214,4 +214,4 @@ var QueueProcessor = class {
|
|
|
214
214
|
export {
|
|
215
215
|
QueueProcessor
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=processor-
|
|
217
|
+
//# sourceMappingURL=processor-MZ3QIUED.js.map
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
createServer
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-XSUQDB6R.js";
|
|
10
|
+
import "./chunk-6SYNGMU4.js";
|
|
11
|
+
import "./chunk-EBQYRNNU.js";
|
|
12
12
|
import "./chunk-OXI26S7U.js";
|
|
13
13
|
import "./chunk-CMQCO27Y.js";
|
|
14
14
|
import "./chunk-XKIEDGQF.js";
|
|
@@ -17,9 +17,9 @@ import "./chunk-VRGRAQDG.js";
|
|
|
17
17
|
import "./chunk-WR6QCJJO.js";
|
|
18
18
|
import "./chunk-TGWEH2BC.js";
|
|
19
19
|
import "./chunk-CUDAT6SS.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-UVN6AKIO.js";
|
|
21
21
|
import "./chunk-KIOUKC3Z.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-BBC46FN4.js";
|
|
23
23
|
import "./chunk-STYHKCG7.js";
|
|
24
24
|
import "./chunk-BJYPTN5S.js";
|
|
25
25
|
import "./chunk-RGRBWDZP.js";
|
|
@@ -190,4 +190,4 @@ async function runServe(options) {
|
|
|
190
190
|
export {
|
|
191
191
|
runServe
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=serve-
|
|
193
|
+
//# sourceMappingURL=serve-FTTLGRAO.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-XSUQDB6R.js";
|
|
5
|
+
import "../chunk-6SYNGMU4.js";
|
|
6
|
+
import "../chunk-EBQYRNNU.js";
|
|
7
7
|
import "../chunk-OXI26S7U.js";
|
|
8
8
|
import "../chunk-CMQCO27Y.js";
|
|
9
9
|
import "../chunk-XKIEDGQF.js";
|
|
@@ -12,9 +12,9 @@ import "../chunk-VRGRAQDG.js";
|
|
|
12
12
|
import "../chunk-WR6QCJJO.js";
|
|
13
13
|
import "../chunk-TGWEH2BC.js";
|
|
14
14
|
import "../chunk-CUDAT6SS.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-UVN6AKIO.js";
|
|
16
16
|
import "../chunk-KIOUKC3Z.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-BBC46FN4.js";
|
|
18
18
|
import "../chunk-STYHKCG7.js";
|
|
19
19
|
import "../chunk-BJYPTN5S.js";
|
|
20
20
|
import "../chunk-RGRBWDZP.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* global window, document, Node, setTimeout, fetch, console */
|
|
2
|
-
(function() {
|
|
3
|
-
'use strict'
|
|
2
|
+
;(function () {
|
|
3
|
+
'use strict'
|
|
4
4
|
|
|
5
|
-
window.__foxInspectMode = false
|
|
6
|
-
window.__foxSessionId = null
|
|
7
|
-
window.__foxSessionTitle = null
|
|
8
|
-
window.__foxInspectEnabled = true
|
|
9
|
-
window.__foxSentPending = false
|
|
10
|
-
window.__foxPopupOpen = false
|
|
11
|
-
window.__foxHighlightedEl = null
|
|
5
|
+
window.__foxInspectMode = false
|
|
6
|
+
window.__foxSessionId = null
|
|
7
|
+
window.__foxSessionTitle = null
|
|
8
|
+
window.__foxInspectEnabled = true
|
|
9
|
+
window.__foxSentPending = false
|
|
10
|
+
window.__foxPopupOpen = false
|
|
11
|
+
window.__foxHighlightedEl = null
|
|
12
12
|
|
|
13
|
-
var overlayStyle = document.createElement('style')
|
|
13
|
+
var overlayStyle = document.createElement('style')
|
|
14
14
|
overlayStyle.textContent = [
|
|
15
15
|
'#__fox-overlay{position:fixed;bottom:16px;right:16px;z-index:2147483647;font-family:system-ui,sans-serif;font-size:13px;pointer-events:none}',
|
|
16
16
|
'#__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}',
|
|
@@ -31,75 +31,76 @@
|
|
|
31
31
|
'#__fox-popup button.__fox-send:hover{background:#2563eb}',
|
|
32
32
|
'#__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}',
|
|
33
33
|
'#__fox-popup button.__fox-cancel:hover{color:#aaa;border-color:#666}',
|
|
34
|
-
'#__fox-popup .__fox-hint{font-size:11px;color:#666;margin-top:6px;line-height:1.4}'
|
|
35
|
-
].join('\n')
|
|
34
|
+
'#__fox-popup .__fox-hint{font-size:11px;color:#666;margin-top:6px;line-height:1.4}',
|
|
35
|
+
].join('\n')
|
|
36
36
|
|
|
37
|
-
var overlay = document.createElement('div')
|
|
38
|
-
overlay.id = '__fox-overlay'
|
|
39
|
-
overlay.innerHTML =
|
|
37
|
+
var overlay = document.createElement('div')
|
|
38
|
+
overlay.id = '__fox-overlay'
|
|
39
|
+
overlay.innerHTML =
|
|
40
|
+
'<div id="__fox-widget">' +
|
|
40
41
|
'<span class="__fox-label">OpenFox</span>' +
|
|
41
42
|
'<button id="__fox-toggle">Send feedback</button>' +
|
|
42
|
-
'</div>'
|
|
43
|
+
'</div>'
|
|
43
44
|
|
|
44
|
-
var toggleBtn
|
|
45
|
+
var toggleBtn
|
|
45
46
|
|
|
46
47
|
function setInspectMode(enabled) {
|
|
47
|
-
window.__foxInspectMode = enabled
|
|
48
|
+
window.__foxInspectMode = enabled
|
|
48
49
|
if (toggleBtn) {
|
|
49
|
-
toggleBtn.textContent = enabled ? 'Exit inspect' : 'Send feedback'
|
|
50
|
-
toggleBtn.classList.toggle('__fox-active', enabled)
|
|
50
|
+
toggleBtn.textContent = enabled ? 'Exit inspect' : 'Send feedback'
|
|
51
|
+
toggleBtn.classList.toggle('__fox-active', enabled)
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
function clearHighlights() {
|
|
55
56
|
if (window.__foxHighlightedEl) {
|
|
56
|
-
window.__foxHighlightedEl.classList.remove('__fox-highlight')
|
|
57
|
-
window.__foxHighlightedEl = null
|
|
57
|
+
window.__foxHighlightedEl.classList.remove('__fox-highlight')
|
|
58
|
+
window.__foxHighlightedEl = null
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
function generateXPath(el) {
|
|
62
|
-
if (!el || el.nodeType !== Node.ELEMENT_NODE) return ''
|
|
63
|
-
var parts = []
|
|
63
|
+
if (!el || el.nodeType !== Node.ELEMENT_NODE) return ''
|
|
64
|
+
var parts = []
|
|
64
65
|
while (el && el.nodeType === Node.ELEMENT_NODE && el !== document.documentElement) {
|
|
65
|
-
var index = 1
|
|
66
|
-
var sibling = el.previousSibling
|
|
66
|
+
var index = 1
|
|
67
|
+
var sibling = el.previousSibling
|
|
67
68
|
while (sibling) {
|
|
68
|
-
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === el.nodeName) index
|
|
69
|
-
sibling = sibling.previousSibling
|
|
69
|
+
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === el.nodeName) index++
|
|
70
|
+
sibling = sibling.previousSibling
|
|
70
71
|
}
|
|
71
|
-
parts.unshift(el.nodeName.toLowerCase() + '[' + index + ']')
|
|
72
|
-
el = el.parentNode
|
|
72
|
+
parts.unshift(el.nodeName.toLowerCase() + '[' + index + ']')
|
|
73
|
+
el = el.parentNode
|
|
73
74
|
}
|
|
74
|
-
return '/' + parts.join('/')
|
|
75
|
+
return '/' + parts.join('/')
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
function stripSvgAndGetText(el) {
|
|
78
79
|
try {
|
|
79
|
-
var clone = el.cloneNode(true)
|
|
80
|
-
var svgs = clone.querySelectorAll('svg')
|
|
80
|
+
var clone = el.cloneNode(true)
|
|
81
|
+
var svgs = clone.querySelectorAll('svg')
|
|
81
82
|
for (var i = 0; i < svgs.length; i++) {
|
|
82
|
-
svgs[i].remove()
|
|
83
|
+
svgs[i].remove()
|
|
83
84
|
}
|
|
84
|
-
var text = (clone.textContent || '').replace(/\s+/g, ' ').trim()
|
|
85
|
-
return text.slice(0, 500) || null
|
|
85
|
+
var text = (clone.textContent || '').replace(/\s+/g, ' ').trim()
|
|
86
|
+
return text.slice(0, 500) || null
|
|
86
87
|
} catch {
|
|
87
|
-
return null
|
|
88
|
+
return null
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
function buildElementData(el) {
|
|
92
|
-
var attrs = {}
|
|
93
|
+
var attrs = {}
|
|
93
94
|
if (el.attributes) {
|
|
94
95
|
for (var i = 0; i < el.attributes.length; i++) {
|
|
95
|
-
var attr = el.attributes[i]
|
|
96
|
+
var attr = el.attributes[i]
|
|
96
97
|
if (attr.name !== 'class' && attr.name !== 'id') {
|
|
97
|
-
attrs[attr.name] = attr.value
|
|
98
|
+
attrs[attr.name] = attr.value
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
var rect = el.getBoundingClientRect()
|
|
102
|
-
var tagName = el.tagName ? el.tagName.toLowerCase() : ''
|
|
102
|
+
var rect = el.getBoundingClientRect()
|
|
103
|
+
var tagName = el.tagName ? el.tagName.toLowerCase() : ''
|
|
103
104
|
return {
|
|
104
105
|
tag: tagName,
|
|
105
106
|
id: el.id || null,
|
|
@@ -109,71 +110,79 @@
|
|
|
109
110
|
textContent: stripSvgAndGetText(el),
|
|
110
111
|
outerHTML: (el.outerHTML || '').slice(0, 1000) || '',
|
|
111
112
|
rect: { x: rect.left, y: rect.top, width: rect.width, height: rect.height },
|
|
112
|
-
attributes: attrs
|
|
113
|
-
}
|
|
113
|
+
attributes: attrs,
|
|
114
|
+
}
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
function showPopup(el, x, y) {
|
|
117
|
-
var existing = document.getElementById('__fox-popup')
|
|
118
|
-
if (existing) existing.remove()
|
|
118
|
+
var existing = document.getElementById('__fox-popup')
|
|
119
|
+
if (existing) existing.remove()
|
|
119
120
|
|
|
120
|
-
window.__foxPopupOpen = true
|
|
121
|
-
var data = buildElementData(el)
|
|
122
|
-
var viewportWidth = window.innerWidth
|
|
123
|
-
var viewportHeight = window.innerHeight
|
|
121
|
+
window.__foxPopupOpen = true
|
|
122
|
+
var data = buildElementData(el)
|
|
123
|
+
var viewportWidth = window.innerWidth
|
|
124
|
+
var viewportHeight = window.innerHeight
|
|
124
125
|
|
|
125
|
-
var left = x + 10
|
|
126
|
-
var top = y + 10
|
|
127
|
-
if (left + 340 > viewportWidth) left = x - 350
|
|
128
|
-
if (top + 280 > viewportHeight) top = y - 290
|
|
129
|
-
if (left < 8) left = 8
|
|
130
|
-
if (top < 8) top = 8
|
|
126
|
+
var left = x + 10
|
|
127
|
+
var top = y + 10
|
|
128
|
+
if (left + 340 > viewportWidth) left = x - 350
|
|
129
|
+
if (top + 280 > viewportHeight) top = y - 290
|
|
130
|
+
if (left < 8) left = 8
|
|
131
|
+
if (top < 8) top = 8
|
|
131
132
|
|
|
132
|
-
var popup = document.createElement('div')
|
|
133
|
-
popup.id = '__fox-popup'
|
|
134
|
-
popup.style.left = left + 'px'
|
|
135
|
-
popup.style.top = top + 'px'
|
|
133
|
+
var popup = document.createElement('div')
|
|
134
|
+
popup.id = '__fox-popup'
|
|
135
|
+
popup.style.left = left + 'px'
|
|
136
|
+
popup.style.top = top + 'px'
|
|
136
137
|
|
|
137
|
-
var tagDisplay = data.tag + (data.id ? '#' + data.id :
|
|
138
|
+
var tagDisplay = data.tag + (data.id ? '#' + data.id : data.className ? '.' + data.className.split(' ')[0] : '')
|
|
138
139
|
|
|
139
140
|
popup.innerHTML =
|
|
140
|
-
'<div class="__fox-tag">Element: <span>' +
|
|
141
|
-
|
|
141
|
+
'<div class="__fox-tag">Element: <span>' +
|
|
142
|
+
tagDisplay +
|
|
143
|
+
'</span></div>' +
|
|
144
|
+
'<div class="__fox-selector">' +
|
|
145
|
+
data.xpath +
|
|
146
|
+
'</div>' +
|
|
142
147
|
'<textarea placeholder="What\'s wrong with this element?"></textarea>' +
|
|
143
|
-
'<div class="__fox-hint">Sending to: ' +
|
|
148
|
+
'<div class="__fox-hint">Sending to: ' +
|
|
149
|
+
(window.__foxSessionTitle || window.__foxSessionId || 'none') +
|
|
150
|
+
'. To target a different session, close this, navigate to that session in OpenFox, and reopen the inspect window.</div>' +
|
|
144
151
|
'<div class="__fox-actions">' +
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
'</div>'
|
|
152
|
+
'<button class="__fox-cancel">Cancel</button>' +
|
|
153
|
+
'<button class="__fox-send">Send to Agent</button>' +
|
|
154
|
+
'</div>'
|
|
148
155
|
|
|
149
|
-
document.body.appendChild(popup)
|
|
156
|
+
document.body.appendChild(popup)
|
|
150
157
|
|
|
151
|
-
var textarea = popup.querySelector('textarea')
|
|
152
|
-
textarea.focus()
|
|
158
|
+
var textarea = popup.querySelector('textarea')
|
|
159
|
+
textarea.focus()
|
|
153
160
|
|
|
154
|
-
textarea.addEventListener('keydown', function(ke) {
|
|
161
|
+
textarea.addEventListener('keydown', function (ke) {
|
|
155
162
|
if (ke.key === 'Enter' && !ke.shiftKey) {
|
|
156
|
-
ke.preventDefault()
|
|
157
|
-
popup.querySelector('.__fox-send').click()
|
|
163
|
+
ke.preventDefault()
|
|
164
|
+
popup.querySelector('.__fox-send').click()
|
|
158
165
|
}
|
|
159
|
-
})
|
|
166
|
+
})
|
|
160
167
|
|
|
161
|
-
popup.querySelector('.__fox-cancel').addEventListener('click', function(e) {
|
|
162
|
-
e.stopPropagation()
|
|
163
|
-
window.__foxPopupOpen = false
|
|
164
|
-
popup.remove()
|
|
165
|
-
})
|
|
168
|
+
popup.querySelector('.__fox-cancel').addEventListener('click', function (e) {
|
|
169
|
+
e.stopPropagation()
|
|
170
|
+
window.__foxPopupOpen = false
|
|
171
|
+
popup.remove()
|
|
172
|
+
})
|
|
166
173
|
|
|
167
|
-
popup.querySelector('.__fox-send').addEventListener('click', function(e) {
|
|
168
|
-
e.stopPropagation()
|
|
169
|
-
if (window.__foxSentPending) return
|
|
170
|
-
window.__foxSentPending = true
|
|
171
|
-
setTimeout(function() {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
popup.querySelector('.__fox-send').addEventListener('click', function (e) {
|
|
175
|
+
e.stopPropagation()
|
|
176
|
+
if (window.__foxSentPending) return
|
|
177
|
+
window.__foxSentPending = true
|
|
178
|
+
setTimeout(function () {
|
|
179
|
+
window.__foxSentPending = false
|
|
180
|
+
}, 3000)
|
|
181
|
+
var annotation = textarea.value.trim()
|
|
182
|
+
window.__foxPopupOpen = false
|
|
183
|
+
popup.remove()
|
|
184
|
+
clearHighlights()
|
|
185
|
+
setInspectMode(false)
|
|
177
186
|
|
|
178
187
|
fetch('/__openfox_feedback', {
|
|
179
188
|
method: 'POST',
|
|
@@ -182,82 +191,92 @@
|
|
|
182
191
|
sessionId: window.__foxSessionId,
|
|
183
192
|
element: data,
|
|
184
193
|
annotation: annotation,
|
|
185
|
-
pageUrl: window.location.href
|
|
186
|
-
})
|
|
187
|
-
}).catch(function(err) {
|
|
188
|
-
console.error('Failed to send feedback:', err)
|
|
189
|
-
})
|
|
190
|
-
})
|
|
194
|
+
pageUrl: window.location.href,
|
|
195
|
+
}),
|
|
196
|
+
}).catch(function (err) {
|
|
197
|
+
console.error('Failed to send feedback:', err)
|
|
198
|
+
})
|
|
199
|
+
})
|
|
191
200
|
|
|
192
|
-
popup.addEventListener('click', function(e) {
|
|
201
|
+
popup.addEventListener('click', function (e) {
|
|
202
|
+
e.stopPropagation()
|
|
203
|
+
})
|
|
193
204
|
|
|
194
205
|
document.addEventListener('keydown', function escHandler(e) {
|
|
195
206
|
if (e.key === 'Escape') {
|
|
196
|
-
window.__foxPopupOpen = false
|
|
197
|
-
popup.remove()
|
|
198
|
-
clearHighlights()
|
|
199
|
-
setInspectMode(false)
|
|
200
|
-
document.removeEventListener('keydown', escHandler)
|
|
207
|
+
window.__foxPopupOpen = false
|
|
208
|
+
popup.remove()
|
|
209
|
+
clearHighlights()
|
|
210
|
+
setInspectMode(false)
|
|
211
|
+
document.removeEventListener('keydown', escHandler)
|
|
201
212
|
}
|
|
202
|
-
})
|
|
213
|
+
})
|
|
203
214
|
}
|
|
204
215
|
|
|
205
|
-
document.addEventListener(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
document.addEventListener(
|
|
217
|
+
'mouseover',
|
|
218
|
+
function (e) {
|
|
219
|
+
if (!window.__foxInspectMode || window.__foxPopupOpen) return
|
|
220
|
+
if (e.target === document.documentElement || e.target === document.body) return
|
|
221
|
+
if (overlay.contains(e.target)) return
|
|
222
|
+
clearHighlights()
|
|
223
|
+
e.target.classList.add('__fox-highlight')
|
|
224
|
+
window.__foxHighlightedEl = e.target
|
|
225
|
+
},
|
|
226
|
+
true,
|
|
227
|
+
)
|
|
213
228
|
|
|
214
|
-
document.addEventListener(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
229
|
+
document.addEventListener(
|
|
230
|
+
'click',
|
|
231
|
+
function (e) {
|
|
232
|
+
if (!window.__foxInspectMode) return
|
|
233
|
+
if (overlay.contains(e.target)) return
|
|
234
|
+
if (document.getElementById('__fox-popup')) return
|
|
218
235
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
236
|
+
e.preventDefault()
|
|
237
|
+
e.stopPropagation()
|
|
238
|
+
var el = window.__foxHighlightedEl
|
|
239
|
+
if (!el) return
|
|
240
|
+
showPopup(el, e.clientX, e.clientY)
|
|
241
|
+
},
|
|
242
|
+
true,
|
|
243
|
+
)
|
|
225
244
|
|
|
226
|
-
document.addEventListener('keydown', function(e) {
|
|
245
|
+
document.addEventListener('keydown', function (e) {
|
|
227
246
|
if (e.key === 'Escape' && window.__foxInspectMode) {
|
|
228
|
-
setInspectMode(false)
|
|
247
|
+
setInspectMode(false)
|
|
229
248
|
}
|
|
230
|
-
})
|
|
249
|
+
})
|
|
231
250
|
|
|
232
|
-
window.addEventListener('message', function(e) {
|
|
251
|
+
window.addEventListener('message', function (e) {
|
|
233
252
|
if (e.data && e.data.type === 'setFoxSessionId') {
|
|
234
|
-
window.__foxSessionId = e.data.sessionId
|
|
253
|
+
window.__foxSessionId = e.data.sessionId
|
|
235
254
|
}
|
|
236
255
|
if (e.data && e.data.type === 'setFoxSessionTitle') {
|
|
237
|
-
window.__foxSessionTitle = e.data.sessionTitle
|
|
256
|
+
window.__foxSessionTitle = e.data.sessionTitle
|
|
238
257
|
}
|
|
239
258
|
if (e.data && e.data.type === 'setFoxInspectEnabled') {
|
|
240
|
-
window.__foxInspectEnabled = e.data.enabled
|
|
241
|
-
overlay.style.display = e.data.enabled ? '' : 'none'
|
|
259
|
+
window.__foxInspectEnabled = e.data.enabled
|
|
260
|
+
overlay.style.display = e.data.enabled ? '' : 'none'
|
|
242
261
|
}
|
|
243
|
-
})
|
|
262
|
+
})
|
|
244
263
|
|
|
245
264
|
function init() {
|
|
246
|
-
if (window.__foxInspectInit) return
|
|
247
|
-
window.__foxInspectInit = true
|
|
248
|
-
document.head.appendChild(overlayStyle)
|
|
249
|
-
document.body.appendChild(overlay)
|
|
250
|
-
toggleBtn = document.getElementById('__fox-toggle')
|
|
251
|
-
toggleBtn.addEventListener('click', function(e) {
|
|
252
|
-
e.stopPropagation()
|
|
253
|
-
setInspectMode(!window.__foxInspectMode)
|
|
254
|
-
})
|
|
255
|
-
overlay.style.display = window.__foxInspectEnabled ? '' : 'none'
|
|
265
|
+
if (window.__foxInspectInit) return
|
|
266
|
+
window.__foxInspectInit = true
|
|
267
|
+
document.head.appendChild(overlayStyle)
|
|
268
|
+
document.body.appendChild(overlay)
|
|
269
|
+
toggleBtn = document.getElementById('__fox-toggle')
|
|
270
|
+
toggleBtn.addEventListener('click', function (e) {
|
|
271
|
+
e.stopPropagation()
|
|
272
|
+
setInspectMode(!window.__foxInspectMode)
|
|
273
|
+
})
|
|
274
|
+
overlay.style.display = window.__foxInspectEnabled ? '' : 'none'
|
|
256
275
|
}
|
|
257
276
|
|
|
258
277
|
if (document.body) {
|
|
259
|
-
init()
|
|
278
|
+
init()
|
|
260
279
|
} else {
|
|
261
|
-
document.addEventListener('DOMContentLoaded', init)
|
|
280
|
+
document.addEventListener('DOMContentLoaded', init)
|
|
262
281
|
}
|
|
263
|
-
})()
|
|
282
|
+
})()
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EBQYRNNU.js";
|
|
15
15
|
import "./chunk-OXI26S7U.js";
|
|
16
16
|
import "./chunk-CMQCO27Y.js";
|
|
17
17
|
import "./chunk-XKIEDGQF.js";
|
|
18
18
|
import "./chunk-PBGOZMVY.js";
|
|
19
19
|
import "./chunk-VRGRAQDG.js";
|
|
20
20
|
import "./chunk-CUDAT6SS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-UVN6AKIO.js";
|
|
22
22
|
import "./chunk-KIOUKC3Z.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-BBC46FN4.js";
|
|
24
24
|
import "./chunk-STYHKCG7.js";
|
|
25
25
|
import {
|
|
26
26
|
AskUserInterrupt,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
stepDoneTool,
|
|
50
50
|
validateToolAction
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=tools-
|
|
52
|
+
//# sourceMappingURL=tools-QJ5K5IJP.js.map
|