pinokiod 7.5.7 → 7.5.9

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.
@@ -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
  }