pinokiod 8.3.34 → 8.3.35
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/kernel/api/uri/index.js +6 -0
- package/package.json +1 -1
- package/server/public/agent-bar-agents.css +154 -0
- package/server/public/agent-bar-agents.js +346 -0
- package/server/public/agent-bar-launch.css +274 -0
- package/server/public/agent-bar-launch.js +333 -0
- package/server/public/agent-bar-panel.js +2 -0
- package/server/public/agent-bar.js +1 -0
- package/server/views/app.ejs +4 -0
- package/server/views/partials/main_sidebar.ejs +4 -0
- package/server/views/terminal.ejs +2 -0
- package/test/agent-bar-agents.test.js +297 -0
- package/test/agent-bar-launch.test.js +375 -0
- package/test/uri-api.test.js +23 -0
package/test/uri-api.test.js
CHANGED
|
@@ -98,3 +98,26 @@ test('uri.open dispatches the exact built URI to Util.openURI', async () => {
|
|
|
98
98
|
Util.openURI = originalOpenURI
|
|
99
99
|
}
|
|
100
100
|
})
|
|
101
|
+
|
|
102
|
+
test('uri.open fails the step when the system could not open the link', async () => {
|
|
103
|
+
const api = new URI()
|
|
104
|
+
const originalOpenURI = Util.openURI
|
|
105
|
+
const printed = []
|
|
106
|
+
|
|
107
|
+
Util.openURI = async () => ({ ok: false, error: 'open exited with code 1' })
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
await assert.rejects(
|
|
111
|
+
api.open({ params: { uri: 'codex://new', params: { path: '/tmp/demo' } } }, (packet) => printed.push(packet)),
|
|
112
|
+
(error) => {
|
|
113
|
+
assert.match(error.message, /could open the codex: link/)
|
|
114
|
+
assert.match(error.message, /may not be installed/)
|
|
115
|
+
assert.match(error.message, /open exited with code 1/)
|
|
116
|
+
return true
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
assert.equal(printed.length, 1)
|
|
120
|
+
} finally {
|
|
121
|
+
Util.openURI = originalOpenURI
|
|
122
|
+
}
|
|
123
|
+
})
|