openfox 1.6.75 → 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/{ask-3RK5YJZE.js → ask-5SSOA6SZ.js} +2 -2
- package/dist/{auth-LZZX63KI.js → auth-56SIRACI.js} +3 -6
- package/dist/auto-compaction-GOHNI2R2.js +27 -0
- package/dist/{branch.api-XADFZZAA.js → branch.api-PWFW26KC.js} +2 -2
- package/dist/{chat-handler-KYMMXPP6.js → chat-handler-K2RDXBO6.js} +31 -29
- package/dist/{chunk-IA4O65CR.js → chunk-6SYNGMU4.js} +100 -68
- package/dist/{chunk-AFATQ5LJ.js → chunk-B5AP3RSV.js} +1 -1
- package/dist/{chunk-PFRQO5Z3.js → chunk-BBC46FN4.js} +61 -28
- package/dist/{chunk-22CTURMH.js → chunk-BJYPTN5S.js} +1 -1
- package/dist/{chunk-DLINTLB7.js → chunk-BSTVRSV6.js} +7 -5
- package/dist/{chunk-7JPKRM6M.js → chunk-CMQCO27Y.js} +22 -12
- package/dist/{chunk-R4HADRYO.js → chunk-CQGTEGKL.js} +1 -1
- package/dist/{chunk-J5DV33SS.js → chunk-CUDAT6SS.js} +46 -18
- package/dist/{chunk-ETIXH35K.js → chunk-EBQYRNNU.js} +535 -291
- package/dist/{chunk-4CQ7CUQ6.js → chunk-I7JVS7V5.js} +5 -5
- package/dist/{chunk-PNBH3RAX.js → chunk-K44MW7JJ.js} +1 -1
- package/dist/{chunk-BLNFJ22S.js → chunk-KIOUKC3Z.js} +6 -4
- package/dist/{chunk-CTAIXOZJ.js → chunk-NDJ6FKSP.js} +1 -1
- package/dist/{chunk-VIGOXEZG.js → chunk-OJBFC6ER.js} +15 -16
- package/dist/{chunk-GQZGIMJO.js → chunk-OXI26S7U.js} +12 -7
- package/dist/{chunk-NBU6KIOD.js → chunk-PBGOZMVY.js} +4 -4
- package/dist/{chunk-B7E3BICY.js → chunk-RGRBWDZP.js} +2 -4
- package/dist/{chunk-KFBIHS3S.js → chunk-STYHKCG7.js} +20 -14
- package/dist/{chunk-55Z3DJ7G.js → chunk-TGWEH2BC.js} +10 -11
- package/dist/{chunk-TYUNDOX2.js → chunk-UKMRZDWM.js} +90 -41
- package/dist/{chunk-5UTTLO4D.js → chunk-UVN6AKIO.js} +89 -49
- package/dist/{chunk-574HZVLE.js → chunk-VRGRAQDG.js} +2 -2
- package/dist/{chunk-JQBTYHUR.js → chunk-WR6QCJJO.js} +53 -15
- package/dist/{chunk-RBPOAAIZ.js → chunk-XKIEDGQF.js} +22 -18
- package/dist/{chunk-XIZ6B6IS.js → chunk-XSUQDB6R.js} +541 -299
- package/dist/cli/dev.js +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/{config-6T4EHAP2.js → config-5CONAOL7.js} +7 -7
- package/dist/{events-LKEZ3YCW.js → events-5RIXWI5Y.js} +6 -6
- package/dist/{folding-JN2WT44N.js → folding-JNOUTI5Z.js} +2 -2
- package/dist/{inspect-proxy-Y4MRAVB7.js → inspect-proxy-Y75AXMRX.js} +3 -3
- package/dist/{manager-HM2J5VMW.js → manager-W7N3XQ4Q.js} +3 -3
- package/dist/orchestrator-TW5II347.js +43 -0
- package/dist/package.json +19 -3
- package/dist/{paths-ZRI56O63.js → paths-X46PPOI2.js} +2 -2
- package/dist/{processor-23O4HPSS.js → processor-MZ3QIUED.js} +15 -11
- package/dist/{project-creator-LASKNQPA.js → project-creator-VD7MLOWE.js} +8 -5
- package/dist/{projects-HEUOWNSR.js → projects-XLMSDFTQ.js} +4 -4
- package/dist/{protocol-5AWNGFLH.js → protocol-4CTV7OZC.js} +3 -3
- package/dist/{protocol-DRBnujwe.d.ts → protocol-4xbfAlGO.d.ts} +3 -0
- package/dist/{provider-AKN355YH.js → provider-ESEBV3LL.js} +15 -11
- package/dist/{pwa-GHQCMCIU.js → pwa-76XP2DY2.js} +2 -2
- package/dist/{runtime-config-ZCK74XKM.js → runtime-config-CBJJJGBD.js} +2 -2
- package/dist/{serve-TW63YCNQ.js → serve-FTTLGRAO.js} +29 -27
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.js +22 -22
- package/dist/server/public/__inspect__.js +163 -143
- package/dist/{service-74Z7JK2J.js → service-D6LC3CAM.js} +3 -2
- package/dist/{settings-NI4ITGV6.js → settings-TQNQB56H.js} +4 -4
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/{store-2IF3ZSLD.js → store-OQ45KONN.js} +2 -2
- package/dist/{tools-RUAY6EVI.js → tools-QJ5K5IJP.js} +18 -18
- package/dist/{vision-fallback-AXH3BGJC.js → vision-fallback-ED27LH6C.js} +3 -3
- package/dist/web/__inspect__.js +178 -155
- package/dist/web/assets/{index-CWdKiSP8.js → index-FjLp1t6r.js} +62 -62
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +19 -3
- package/dist/auto-compaction-OW4P2QWQ.js +0 -27
- package/dist/orchestrator-QP4O7MUM.js +0 -43
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* global window, document, Node, setTimeout, fetch, console */
|
|
2
|
+
;(function () {
|
|
3
|
+
'use strict'
|
|
3
4
|
|
|
4
|
-
window.__foxInspectMode = false
|
|
5
|
-
window.__foxSessionId = null
|
|
6
|
-
window.__foxSessionTitle = null
|
|
7
|
-
window.__foxInspectEnabled = true
|
|
8
|
-
window.__foxSentPending = false
|
|
9
|
-
window.__foxPopupOpen = false
|
|
10
|
-
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
|
|
11
12
|
|
|
12
|
-
var overlayStyle = document.createElement('style')
|
|
13
|
+
var overlayStyle = document.createElement('style')
|
|
13
14
|
overlayStyle.textContent = [
|
|
14
15
|
'#__fox-overlay{position:fixed;bottom:16px;right:16px;z-index:2147483647;font-family:system-ui,sans-serif;font-size:13px;pointer-events:none}',
|
|
15
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}',
|
|
@@ -30,75 +31,76 @@
|
|
|
30
31
|
'#__fox-popup button.__fox-send:hover{background:#2563eb}',
|
|
31
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}',
|
|
32
33
|
'#__fox-popup button.__fox-cancel:hover{color:#aaa;border-color:#666}',
|
|
33
|
-
'#__fox-popup .__fox-hint{font-size:11px;color:#666;margin-top:6px;line-height:1.4}'
|
|
34
|
-
].join('\n')
|
|
34
|
+
'#__fox-popup .__fox-hint{font-size:11px;color:#666;margin-top:6px;line-height:1.4}',
|
|
35
|
+
].join('\n')
|
|
35
36
|
|
|
36
|
-
var overlay = document.createElement('div')
|
|
37
|
-
overlay.id = '__fox-overlay'
|
|
38
|
-
overlay.innerHTML =
|
|
37
|
+
var overlay = document.createElement('div')
|
|
38
|
+
overlay.id = '__fox-overlay'
|
|
39
|
+
overlay.innerHTML =
|
|
40
|
+
'<div id="__fox-widget">' +
|
|
39
41
|
'<span class="__fox-label">OpenFox</span>' +
|
|
40
42
|
'<button id="__fox-toggle">Send feedback</button>' +
|
|
41
|
-
'</div>'
|
|
43
|
+
'</div>'
|
|
42
44
|
|
|
43
|
-
var toggleBtn
|
|
45
|
+
var toggleBtn
|
|
44
46
|
|
|
45
47
|
function setInspectMode(enabled) {
|
|
46
|
-
window.__foxInspectMode = enabled
|
|
48
|
+
window.__foxInspectMode = enabled
|
|
47
49
|
if (toggleBtn) {
|
|
48
|
-
toggleBtn.textContent = enabled ? 'Exit inspect' : 'Send feedback'
|
|
49
|
-
toggleBtn.classList.toggle('__fox-active', enabled)
|
|
50
|
+
toggleBtn.textContent = enabled ? 'Exit inspect' : 'Send feedback'
|
|
51
|
+
toggleBtn.classList.toggle('__fox-active', enabled)
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
function clearHighlights() {
|
|
54
56
|
if (window.__foxHighlightedEl) {
|
|
55
|
-
window.__foxHighlightedEl.classList.remove('__fox-highlight')
|
|
56
|
-
window.__foxHighlightedEl = null
|
|
57
|
+
window.__foxHighlightedEl.classList.remove('__fox-highlight')
|
|
58
|
+
window.__foxHighlightedEl = null
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
function generateXPath(el) {
|
|
61
|
-
if (!el || el.nodeType !== Node.ELEMENT_NODE) return ''
|
|
62
|
-
var parts = []
|
|
63
|
+
if (!el || el.nodeType !== Node.ELEMENT_NODE) return ''
|
|
64
|
+
var parts = []
|
|
63
65
|
while (el && el.nodeType === Node.ELEMENT_NODE && el !== document.documentElement) {
|
|
64
|
-
var index = 1
|
|
65
|
-
var sibling = el.previousSibling
|
|
66
|
+
var index = 1
|
|
67
|
+
var sibling = el.previousSibling
|
|
66
68
|
while (sibling) {
|
|
67
|
-
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === el.nodeName) index
|
|
68
|
-
sibling = sibling.previousSibling
|
|
69
|
+
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === el.nodeName) index++
|
|
70
|
+
sibling = sibling.previousSibling
|
|
69
71
|
}
|
|
70
|
-
parts.unshift(el.nodeName.toLowerCase() + '[' + index + ']')
|
|
71
|
-
el = el.parentNode
|
|
72
|
+
parts.unshift(el.nodeName.toLowerCase() + '[' + index + ']')
|
|
73
|
+
el = el.parentNode
|
|
72
74
|
}
|
|
73
|
-
return '/' + parts.join('/')
|
|
75
|
+
return '/' + parts.join('/')
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
function stripSvgAndGetText(el) {
|
|
77
79
|
try {
|
|
78
|
-
var clone = el.cloneNode(true)
|
|
79
|
-
var svgs = clone.querySelectorAll('svg')
|
|
80
|
+
var clone = el.cloneNode(true)
|
|
81
|
+
var svgs = clone.querySelectorAll('svg')
|
|
80
82
|
for (var i = 0; i < svgs.length; i++) {
|
|
81
|
-
svgs[i].remove()
|
|
83
|
+
svgs[i].remove()
|
|
82
84
|
}
|
|
83
|
-
var text = (clone.textContent || '').replace(/\s+/g, ' ').trim()
|
|
84
|
-
return text.slice(0, 500) || null
|
|
85
|
-
} catch
|
|
86
|
-
return null
|
|
85
|
+
var text = (clone.textContent || '').replace(/\s+/g, ' ').trim()
|
|
86
|
+
return text.slice(0, 500) || null
|
|
87
|
+
} catch {
|
|
88
|
+
return null
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
function buildElementData(el) {
|
|
91
|
-
var attrs = {}
|
|
93
|
+
var attrs = {}
|
|
92
94
|
if (el.attributes) {
|
|
93
95
|
for (var i = 0; i < el.attributes.length; i++) {
|
|
94
|
-
var attr = el.attributes[i]
|
|
96
|
+
var attr = el.attributes[i]
|
|
95
97
|
if (attr.name !== 'class' && attr.name !== 'id') {
|
|
96
|
-
attrs[attr.name] = attr.value
|
|
98
|
+
attrs[attr.name] = attr.value
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
|
-
var rect = el.getBoundingClientRect()
|
|
101
|
-
var tagName = el.tagName ? el.tagName.toLowerCase() : ''
|
|
102
|
+
var rect = el.getBoundingClientRect()
|
|
103
|
+
var tagName = el.tagName ? el.tagName.toLowerCase() : ''
|
|
102
104
|
return {
|
|
103
105
|
tag: tagName,
|
|
104
106
|
id: el.id || null,
|
|
@@ -108,71 +110,79 @@
|
|
|
108
110
|
textContent: stripSvgAndGetText(el),
|
|
109
111
|
outerHTML: (el.outerHTML || '').slice(0, 1000) || '',
|
|
110
112
|
rect: { x: rect.left, y: rect.top, width: rect.width, height: rect.height },
|
|
111
|
-
attributes: attrs
|
|
112
|
-
}
|
|
113
|
+
attributes: attrs,
|
|
114
|
+
}
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
function showPopup(el, x, y) {
|
|
116
|
-
var existing = document.getElementById('__fox-popup')
|
|
117
|
-
if (existing) existing.remove()
|
|
118
|
+
var existing = document.getElementById('__fox-popup')
|
|
119
|
+
if (existing) existing.remove()
|
|
118
120
|
|
|
119
|
-
window.__foxPopupOpen = true
|
|
120
|
-
var data = buildElementData(el)
|
|
121
|
-
var viewportWidth = window.innerWidth
|
|
122
|
-
var viewportHeight = window.innerHeight
|
|
121
|
+
window.__foxPopupOpen = true
|
|
122
|
+
var data = buildElementData(el)
|
|
123
|
+
var viewportWidth = window.innerWidth
|
|
124
|
+
var viewportHeight = window.innerHeight
|
|
123
125
|
|
|
124
|
-
var left = x + 10
|
|
125
|
-
var top = y + 10
|
|
126
|
-
if (left + 340 > viewportWidth) left = x - 350
|
|
127
|
-
if (top + 280 > viewportHeight) top = y - 290
|
|
128
|
-
if (left < 8) left = 8
|
|
129
|
-
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
|
|
130
132
|
|
|
131
|
-
var popup = document.createElement('div')
|
|
132
|
-
popup.id = '__fox-popup'
|
|
133
|
-
popup.style.left = left + 'px'
|
|
134
|
-
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'
|
|
135
137
|
|
|
136
|
-
var tagDisplay = data.tag + (data.id ? '#' + data.id :
|
|
138
|
+
var tagDisplay = data.tag + (data.id ? '#' + data.id : data.className ? '.' + data.className.split(' ')[0] : '')
|
|
137
139
|
|
|
138
140
|
popup.innerHTML =
|
|
139
|
-
'<div class="__fox-tag">Element: <span>' +
|
|
140
|
-
|
|
141
|
+
'<div class="__fox-tag">Element: <span>' +
|
|
142
|
+
tagDisplay +
|
|
143
|
+
'</span></div>' +
|
|
144
|
+
'<div class="__fox-selector">' +
|
|
145
|
+
data.xpath +
|
|
146
|
+
'</div>' +
|
|
141
147
|
'<textarea placeholder="What\'s wrong with this element?"></textarea>' +
|
|
142
|
-
'<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>' +
|
|
143
151
|
'<div class="__fox-actions">' +
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
'</div>'
|
|
152
|
+
'<button class="__fox-cancel">Cancel</button>' +
|
|
153
|
+
'<button class="__fox-send">Send to Agent</button>' +
|
|
154
|
+
'</div>'
|
|
147
155
|
|
|
148
|
-
document.body.appendChild(popup)
|
|
156
|
+
document.body.appendChild(popup)
|
|
149
157
|
|
|
150
|
-
var textarea = popup.querySelector('textarea')
|
|
151
|
-
textarea.focus()
|
|
158
|
+
var textarea = popup.querySelector('textarea')
|
|
159
|
+
textarea.focus()
|
|
152
160
|
|
|
153
|
-
textarea.addEventListener('keydown', function(ke) {
|
|
161
|
+
textarea.addEventListener('keydown', function (ke) {
|
|
154
162
|
if (ke.key === 'Enter' && !ke.shiftKey) {
|
|
155
|
-
ke.preventDefault()
|
|
156
|
-
popup.querySelector('.__fox-send').click()
|
|
163
|
+
ke.preventDefault()
|
|
164
|
+
popup.querySelector('.__fox-send').click()
|
|
157
165
|
}
|
|
158
|
-
})
|
|
166
|
+
})
|
|
159
167
|
|
|
160
|
-
popup.querySelector('.__fox-cancel').addEventListener('click', function(e) {
|
|
161
|
-
e.stopPropagation()
|
|
162
|
-
window.__foxPopupOpen = false
|
|
163
|
-
popup.remove()
|
|
164
|
-
})
|
|
168
|
+
popup.querySelector('.__fox-cancel').addEventListener('click', function (e) {
|
|
169
|
+
e.stopPropagation()
|
|
170
|
+
window.__foxPopupOpen = false
|
|
171
|
+
popup.remove()
|
|
172
|
+
})
|
|
165
173
|
|
|
166
|
-
popup.querySelector('.__fox-send').addEventListener('click', function(e) {
|
|
167
|
-
e.stopPropagation()
|
|
168
|
-
if (window.__foxSentPending) return
|
|
169
|
-
window.__foxSentPending = true
|
|
170
|
-
setTimeout(function() {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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)
|
|
176
186
|
|
|
177
187
|
fetch('/__openfox_feedback', {
|
|
178
188
|
method: 'POST',
|
|
@@ -181,82 +191,92 @@
|
|
|
181
191
|
sessionId: window.__foxSessionId,
|
|
182
192
|
element: data,
|
|
183
193
|
annotation: annotation,
|
|
184
|
-
pageUrl: window.location.href
|
|
185
|
-
})
|
|
186
|
-
}).catch(function(err) {
|
|
187
|
-
console.error('Failed to send feedback:', err)
|
|
188
|
-
})
|
|
189
|
-
})
|
|
194
|
+
pageUrl: window.location.href,
|
|
195
|
+
}),
|
|
196
|
+
}).catch(function (err) {
|
|
197
|
+
console.error('Failed to send feedback:', err)
|
|
198
|
+
})
|
|
199
|
+
})
|
|
190
200
|
|
|
191
|
-
popup.addEventListener('click', function(e) {
|
|
201
|
+
popup.addEventListener('click', function (e) {
|
|
202
|
+
e.stopPropagation()
|
|
203
|
+
})
|
|
192
204
|
|
|
193
205
|
document.addEventListener('keydown', function escHandler(e) {
|
|
194
206
|
if (e.key === 'Escape') {
|
|
195
|
-
window.__foxPopupOpen = false
|
|
196
|
-
popup.remove()
|
|
197
|
-
clearHighlights()
|
|
198
|
-
setInspectMode(false)
|
|
199
|
-
document.removeEventListener('keydown', escHandler)
|
|
207
|
+
window.__foxPopupOpen = false
|
|
208
|
+
popup.remove()
|
|
209
|
+
clearHighlights()
|
|
210
|
+
setInspectMode(false)
|
|
211
|
+
document.removeEventListener('keydown', escHandler)
|
|
200
212
|
}
|
|
201
|
-
})
|
|
213
|
+
})
|
|
202
214
|
}
|
|
203
215
|
|
|
204
|
-
document.addEventListener(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
+
)
|
|
212
228
|
|
|
213
|
-
document.addEventListener(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
|
217
235
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
+
)
|
|
224
244
|
|
|
225
|
-
document.addEventListener('keydown', function(e) {
|
|
245
|
+
document.addEventListener('keydown', function (e) {
|
|
226
246
|
if (e.key === 'Escape' && window.__foxInspectMode) {
|
|
227
|
-
setInspectMode(false)
|
|
247
|
+
setInspectMode(false)
|
|
228
248
|
}
|
|
229
|
-
})
|
|
249
|
+
})
|
|
230
250
|
|
|
231
|
-
window.addEventListener('message', function(e) {
|
|
251
|
+
window.addEventListener('message', function (e) {
|
|
232
252
|
if (e.data && e.data.type === 'setFoxSessionId') {
|
|
233
|
-
window.__foxSessionId = e.data.sessionId
|
|
253
|
+
window.__foxSessionId = e.data.sessionId
|
|
234
254
|
}
|
|
235
255
|
if (e.data && e.data.type === 'setFoxSessionTitle') {
|
|
236
|
-
window.__foxSessionTitle = e.data.sessionTitle
|
|
256
|
+
window.__foxSessionTitle = e.data.sessionTitle
|
|
237
257
|
}
|
|
238
258
|
if (e.data && e.data.type === 'setFoxInspectEnabled') {
|
|
239
|
-
window.__foxInspectEnabled = e.data.enabled
|
|
240
|
-
overlay.style.display = e.data.enabled ? '' : 'none'
|
|
259
|
+
window.__foxInspectEnabled = e.data.enabled
|
|
260
|
+
overlay.style.display = e.data.enabled ? '' : 'none'
|
|
241
261
|
}
|
|
242
|
-
})
|
|
262
|
+
})
|
|
243
263
|
|
|
244
264
|
function init() {
|
|
245
|
-
if (window.__foxInspectInit) return
|
|
246
|
-
window.__foxInspectInit = true
|
|
247
|
-
document.head.appendChild(overlayStyle)
|
|
248
|
-
document.body.appendChild(overlay)
|
|
249
|
-
toggleBtn = document.getElementById('__fox-toggle')
|
|
250
|
-
toggleBtn.addEventListener('click', function(e) {
|
|
251
|
-
e.stopPropagation()
|
|
252
|
-
setInspectMode(!window.__foxInspectMode)
|
|
253
|
-
})
|
|
254
|
-
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'
|
|
255
275
|
}
|
|
256
276
|
|
|
257
277
|
if (document.body) {
|
|
258
|
-
init()
|
|
278
|
+
init()
|
|
259
279
|
} else {
|
|
260
|
-
document.addEventListener('DOMContentLoaded', init)
|
|
280
|
+
document.addEventListener('DOMContentLoaded', init)
|
|
261
281
|
}
|
|
262
|
-
})()
|
|
282
|
+
})()
|
|
@@ -44,7 +44,8 @@ async function createWrapperScript() {
|
|
|
44
44
|
await mkdir(binDir, { recursive: true });
|
|
45
45
|
const scriptPath = expandPath(RUN_SCRIPT_PATH);
|
|
46
46
|
const scriptContent = `#!/bin/bash
|
|
47
|
-
source ~/.
|
|
47
|
+
source ~/.profile 2>/dev/null || true
|
|
48
|
+
source ~/.bashrc 2>/dev/null || true
|
|
48
49
|
exec openfox
|
|
49
50
|
`;
|
|
50
51
|
await writeFile(scriptPath, scriptContent, { encoding: "utf-8" });
|
|
@@ -225,4 +226,4 @@ async function serviceUninstall() {
|
|
|
225
226
|
export {
|
|
226
227
|
runServiceCommand
|
|
227
228
|
};
|
|
228
|
-
//# sourceMappingURL=service-
|
|
229
|
+
//# sourceMappingURL=service-D6LC3CAM.js.map
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
getAllSettings,
|
|
6
6
|
getSetting,
|
|
7
7
|
setSetting
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-OXI26S7U.js";
|
|
9
|
+
import "./chunk-KIOUKC3Z.js";
|
|
10
|
+
import "./chunk-K44MW7JJ.js";
|
|
11
11
|
export {
|
|
12
12
|
SETTINGS_DEFAULTS,
|
|
13
13
|
SETTINGS_KEYS,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
getSetting,
|
|
17
17
|
setSetting
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=settings-
|
|
19
|
+
//# sourceMappingURL=settings-TQNQB56H.js.map
|
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 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-
|
|
1
|
+
import { M as Message, S as SessionStats } from '../protocol-4xbfAlGO.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-4xbfAlGO.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Session stats computation - aggregates response-level MessageStats from
|
package/dist/shared/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeSessionStats
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RGRBWDZP.js";
|
|
4
4
|
import {
|
|
5
5
|
createClientMessage,
|
|
6
6
|
createServerMessage,
|
|
7
7
|
isClientMessage,
|
|
8
8
|
isServerMessage
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NDJ6FKSP.js";
|
|
10
10
|
export {
|
|
11
11
|
computeSessionStats,
|
|
12
12
|
createClientMessage,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
removeProcess,
|
|
14
14
|
startProcess,
|
|
15
15
|
updateStatus
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VRGRAQDG.js";
|
|
17
17
|
export {
|
|
18
18
|
appendLog,
|
|
19
19
|
cleanupAllProcesses,
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
startProcess,
|
|
31
31
|
updateStatus
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=store-
|
|
33
|
+
//# sourceMappingURL=store-OQ45KONN.js.map
|
|
@@ -11,27 +11,27 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-EBQYRNNU.js";
|
|
15
|
+
import "./chunk-OXI26S7U.js";
|
|
16
|
+
import "./chunk-CMQCO27Y.js";
|
|
17
|
+
import "./chunk-XKIEDGQF.js";
|
|
18
|
+
import "./chunk-PBGOZMVY.js";
|
|
19
|
+
import "./chunk-VRGRAQDG.js";
|
|
20
|
+
import "./chunk-CUDAT6SS.js";
|
|
21
|
+
import "./chunk-UVN6AKIO.js";
|
|
22
|
+
import "./chunk-KIOUKC3Z.js";
|
|
23
|
+
import "./chunk-BBC46FN4.js";
|
|
24
|
+
import "./chunk-STYHKCG7.js";
|
|
25
25
|
import {
|
|
26
26
|
AskUserInterrupt,
|
|
27
27
|
cancelQuestionsForSession,
|
|
28
28
|
provideAnswer
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-BJYPTN5S.js";
|
|
30
|
+
import "./chunk-NDJ6FKSP.js";
|
|
31
|
+
import "./chunk-CQGTEGKL.js";
|
|
32
|
+
import "./chunk-B5AP3RSV.js";
|
|
33
|
+
import "./chunk-BSTVRSV6.js";
|
|
34
|
+
import "./chunk-K44MW7JJ.js";
|
|
35
35
|
export {
|
|
36
36
|
AskUserInterrupt,
|
|
37
37
|
PathAccessDeniedError,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
stepDoneTool,
|
|
50
50
|
validateToolAction
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=tools-
|
|
52
|
+
//# sourceMappingURL=tools-QJ5K5IJP.js.map
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
getVisionFallbackConfig,
|
|
8
8
|
isVisionFallbackEnabled,
|
|
9
9
|
setVisionFallbackConfig
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-BSTVRSV6.js";
|
|
11
|
+
import "./chunk-K44MW7JJ.js";
|
|
12
12
|
export {
|
|
13
13
|
clearDescriptionCache,
|
|
14
14
|
describeImage,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
isVisionFallbackEnabled,
|
|
20
20
|
setVisionFallbackConfig
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=vision-fallback-
|
|
22
|
+
//# sourceMappingURL=vision-fallback-ED27LH6C.js.map
|