pinokiod 7.5.6 → 7.5.8
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/shell/index.js +7 -2
- package/kernel/bin/node.js +13 -8
- package/kernel/shell.js +20 -1
- package/kernel/shell_conda_runtime_guard.js +647 -0
- package/kernel/shells.js +8 -2
- package/package.json +1 -1
- package/server/index.js +3 -0
- package/server/public/common.js +11 -4
- package/server/public/logs.js +597 -4
- package/server/public/style.css +203 -42
- package/server/views/app.ejs +39 -31
- package/server/views/editor.ejs +1 -0
- package/server/views/install.ejs +1 -0
- package/server/views/logs.ejs +9 -5
- package/server/views/terminal.ejs +34 -5
- package/test/node-bin.test.js +39 -0
- package/test/shell-api.test.js +99 -9
- package/test/shell-conda-runtime-guard.test.js +558 -0
- package/test/shells-live-error.test.js +24 -2
package/server/public/common.js
CHANGED
|
@@ -4165,16 +4165,21 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
4165
4165
|
refreshTerminalSessions
|
|
4166
4166
|
});
|
|
4167
4167
|
|
|
4168
|
-
function buildAskAiLaunchUrl(agentHref, workspaceCwd) {
|
|
4168
|
+
function buildAskAiLaunchUrl(agentHref, workspaceCwd, prompt) {
|
|
4169
4169
|
let next = agentHref || '';
|
|
4170
4170
|
try {
|
|
4171
4171
|
const parsed = new URL(agentHref, window.location.origin);
|
|
4172
|
+
const hasPromptOverride = typeof prompt === 'string';
|
|
4173
|
+
const normalizedPrompt = hasPromptOverride ? prompt.trim() : '';
|
|
4172
4174
|
if (isPluginLauncherPath(parsed.pathname)) {
|
|
4173
4175
|
if (workspaceCwd && !parsed.searchParams.has('cwd')) {
|
|
4174
4176
|
parsed.searchParams.set('cwd', workspaceCwd);
|
|
4175
4177
|
}
|
|
4176
4178
|
parsed.searchParams.set('ask_ai', '1');
|
|
4177
4179
|
parsed.searchParams.delete('prompt');
|
|
4180
|
+
if (hasPromptOverride && normalizedPrompt) {
|
|
4181
|
+
parsed.searchParams.set('prompt', normalizedPrompt);
|
|
4182
|
+
}
|
|
4178
4183
|
}
|
|
4179
4184
|
next = `${parsed.pathname}${parsed.search}${parsed.hash}`;
|
|
4180
4185
|
} catch (_) {}
|
|
@@ -4204,7 +4209,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
4204
4209
|
workspace: payload.workspace || '',
|
|
4205
4210
|
workspaceCwd: payload.workspaceCwd || '',
|
|
4206
4211
|
agentHref: payload.agentHref,
|
|
4207
|
-
agentLabel: payload.agentLabel || ''
|
|
4212
|
+
agentLabel: payload.agentLabel || '',
|
|
4213
|
+
prompt: payload.prompt || ''
|
|
4208
4214
|
}, '*');
|
|
4209
4215
|
dispatched = true;
|
|
4210
4216
|
}
|
|
@@ -4253,12 +4259,13 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
4253
4259
|
workspace,
|
|
4254
4260
|
workspaceCwd,
|
|
4255
4261
|
agentHref: tool.href,
|
|
4256
|
-
agentLabel: tool.label || ''
|
|
4262
|
+
agentLabel: tool.label || '',
|
|
4263
|
+
prompt: options && typeof options.prompt === 'string' ? options.prompt : ''
|
|
4257
4264
|
};
|
|
4258
4265
|
if (dispatchAskAiLaunch(payload)) {
|
|
4259
4266
|
return;
|
|
4260
4267
|
}
|
|
4261
|
-
const fallbackUrl = buildAskAiLaunchUrl(tool.href, workspaceCwd);
|
|
4268
|
+
const fallbackUrl = buildAskAiLaunchUrl(tool.href, workspaceCwd, payload.prompt);
|
|
4262
4269
|
if (fallbackUrl) {
|
|
4263
4270
|
window.location.href = fallbackUrl;
|
|
4264
4271
|
}
|