@viberaven/cli 1.2.1 → 1.2.2

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/dist/cli.js CHANGED
@@ -12304,7 +12304,7 @@ var VERSION;
12304
12304
  var init_version = __esm({
12305
12305
  "src/version.ts"() {
12306
12306
  "use strict";
12307
- VERSION = "1.2.1";
12307
+ VERSION = "1.2.2";
12308
12308
  }
12309
12309
  });
12310
12310
 
@@ -18846,18 +18846,20 @@ function connectCliAgent(agentId, chatIndex, options) {
18846
18846
  }
18847
18847
 
18848
18848
  function cliSetupProbeLabel() {
18849
- return demo.cliProbeStatus === 'probing' ? 'Testing...' : demo.cliProbeStatus === 'success' ? 'Connected' : demo.cliProbeStatus === 'failed' ? 'Try again' : 'Test connection';
18849
+ return demo.cliProbeStatus === 'probing' ? 'Testing\u2026' : demo.cliProbeStatus === 'success' ? 'Connected \u2014 continue to chat' : demo.cliProbeStatus === 'failed' ? 'Test connection again' : 'Test connection & verify';
18850
18850
  }
18851
18851
 
18852
18852
  function CliSetupActions(targetId, index) {
18853
18853
  const setup = cliSetupFor(targetId);
18854
18854
  const probeLabel = cliSetupProbeLabel();
18855
+ const ctaPending = demo.cliProbeStatus !== 'success' && demo.cliProbeStatus !== 'probing';
18856
+ const ctaClass = 'vr-cli-action-button is-primary is-cta' + (ctaPending ? ' is-pending' : '');
18855
18857
  return '<div class="vr-cli-connect-expand-actions">' +
18856
18858
  '<button class="vr-cli-action-button" type="button" data-action="run-cli-install" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('shell') + 'Run install</button>' +
18857
18859
  '<button class="vr-cli-action-button" type="button" data-action="run-cli-signin" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('shell') + 'Run sign in</button>' +
18858
- '<button class="vr-cli-action-button" type="button" data-action="finish-cli-signin" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('check') + 'I finished sign in</button>' +
18859
- '<button class="vr-cli-action-button is-primary" type="button" data-action="test-cli-connection" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('refresh') + escapeHtml(probeLabel) + '</button>' +
18860
18860
  '</div>' +
18861
+ '<p class="vr-cli-setup-cta-hint">After sign-in finishes, click below to confirm the connection \u2014 chat only works once this verifies.</p>' +
18862
+ '<button class="' + ctaClass + '" type="button" data-action="test-cli-connection" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('refresh') + escapeHtml(probeLabel) + '</button>' +
18861
18863
  '<p class="vr-cli-setup-hint">Type commands in the Studio terminal below, or run: <code>' + escapeHtml(setup.installCommand) + '</code> then <code>' + escapeHtml(setup.signInCommand) + '</code></p>';
18862
18864
  }
18863
18865
 
@@ -19298,7 +19300,7 @@ async function runCliSignInInStudio(agentId, chatIndex) {
19298
19300
  String(payload?.output || payload?.message || 'Sign-in command finished.'),
19299
19301
  payload?.interactiveNote ? String(payload.interactiveNote) : '',
19300
19302
  '',
19301
- 'Complete any browser login, then click I finished sign in or Test connection.'
19303
+ 'Complete any browser login, then click Test connection below to verify.'
19302
19304
  ]);
19303
19305
  demo.cliTerminalDraft = setupCommandFallback(agentId, 'sign-in');
19304
19306
  demo.notice = 'Sign-in ran in Studio terminal. Finish login if prompted, then test the connection.';
@@ -19330,7 +19332,7 @@ async function openCliOsTerminal(agentId, chatIndex) {
19330
19332
  '',
19331
19333
  String(payload?.message || 'Complete sign-in in the OS terminal window that opened.'),
19332
19334
  '',
19333
- 'When login finishes, return here and click I finished sign in or Test connection.'
19335
+ 'When login finishes, return here and click Test connection below to verify.'
19334
19336
  ]);
19335
19337
  demo.notice = payload?.ok ? 'OS terminal opened for sign-in fallback.' : 'Could not open an OS terminal window.';
19336
19338
  } catch {
@@ -19340,16 +19342,6 @@ async function openCliOsTerminal(agentId, chatIndex) {
19340
19342
  render();
19341
19343
  }
19342
19344
 
19343
- function finishCliSignIn(agentId, chatIndex) {
19344
- const laneIndex = Math.max(0, Number(chatIndex) || 0);
19345
- setConnectTarget(agentId);
19346
- demo.pickerChatIndex = laneIndex;
19347
- demo.activeStudioTab = 'terminal';
19348
- appendTerminalLines(['If sign-in finished in the browser or OS window, click Test connection below.', '']);
19349
- demo.notice = 'When sign-in finishes, click Test connection to verify.';
19350
- render();
19351
- }
19352
-
19353
19345
  function ModelPicker(index) {
19354
19346
  const chat = chatContext(index);
19355
19347
  const models = allModelOptions(index);
@@ -19695,12 +19687,8 @@ function renderAgentAnswerHtml(rawText, chatIndex, cards) {
19695
19687
  const hasMissionPlanSteps = Boolean(cards && Array.isArray(cards.planSteps) && cards.planSteps.length);
19696
19688
  const structured = parseAgentSections(visibleText, { skipPlanSections: hasMissionPlanSteps });
19697
19689
  if (structured) {
19698
- const hasGateSection = structured.some((section) => section.name.toLowerCase() === 'gate');
19699
- const gateStrip = !hasGateSection && currentState.gate && currentState.gate.label
19700
- ? AgentGateStrip('', currentState.gate)
19701
- : '';
19702
19690
  const sectionCards = structured.map((section) => renderAgentSectionCard(section, chatIndex)).join('');
19703
- return '<div class="vr-agent-answer-body vr-agent-answer-structured"><div class="vr-agent-sections">' + gateStrip + sectionCards + '</div></div>';
19691
+ return '<div class="vr-agent-answer-body vr-agent-answer-structured"><div class="vr-agent-sections">' + sectionCards + '</div></div>';
19704
19692
  }
19705
19693
  const blocks = [];
19706
19694
  let listType = null;
@@ -20225,7 +20213,7 @@ app.addEventListener('click', async (event) => {
20225
20213
  return;
20226
20214
  }
20227
20215
 
20228
- const connectActionButton = event.target.closest('[data-action="run-cli-install"], [data-action="run-cli-signin"], [data-action="finish-cli-signin"], [data-action="open-os-terminal"], [data-action="test-cli-connection"], [data-action="copy-cli-command"], [data-action="terminal-select-cli"], [data-action="terminal-shell-run"], [data-action="connect-complete-chat"], [data-action="reset-cli-connect"]');
20216
+ const connectActionButton = event.target.closest('[data-action="run-cli-install"], [data-action="run-cli-signin"], [data-action="open-os-terminal"], [data-action="test-cli-connection"], [data-action="copy-cli-command"], [data-action="terminal-select-cli"], [data-action="terminal-shell-run"], [data-action="connect-complete-chat"], [data-action="reset-cli-connect"]');
20229
20217
  if (connectActionButton) {
20230
20218
  const action = connectActionButton.getAttribute('data-action');
20231
20219
  const agentId = connectActionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
@@ -20279,10 +20267,6 @@ app.addEventListener('click', async (event) => {
20279
20267
  await runCliSignInInStudio(agentId, chatIndex);
20280
20268
  return;
20281
20269
  }
20282
- if (action === 'finish-cli-signin') {
20283
- finishCliSignIn(agentId, chatIndex);
20284
- return;
20285
- }
20286
20270
  if (action === 'open-os-terminal') {
20287
20271
  await openCliOsTerminal(agentId, chatIndex);
20288
20272
  return;
@@ -20548,12 +20532,6 @@ app.addEventListener('click', async (event) => {
20548
20532
  await runCliSignInInStudio(agentId, chatIndex);
20549
20533
  return;
20550
20534
  }
20551
- if (action === 'finish-cli-signin') {
20552
- const agentId = actionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
20553
- const chatIndex = Number(actionButton.getAttribute('data-chat-index') || demo.pickerChatIndex || 0);
20554
- finishCliSignIn(agentId, chatIndex);
20555
- return;
20556
- }
20557
20535
  if (action === 'open-os-terminal') {
20558
20536
  const agentId = actionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
20559
20537
  const chatIndex = Number(actionButton.getAttribute('data-chat-index') || demo.pickerChatIndex || 0);
@@ -23790,6 +23768,33 @@ body:has(.vr-app.is-dragging) {
23790
23768
  background: rgba(124, 58, 237, 0.92);
23791
23769
  color: #fff;
23792
23770
  }
23771
+ .vr-cli-setup-cta-hint {
23772
+ margin: 9px 0 5px;
23773
+ color: #c4b5fd;
23774
+ font-size: 12px;
23775
+ font-weight: 650;
23776
+ line-height: 1.4;
23777
+ }
23778
+ .vr-cli-action-button.is-cta {
23779
+ width: 100%;
23780
+ justify-content: center;
23781
+ min-height: 42px;
23782
+ font-size: 13.5px;
23783
+ font-weight: 750;
23784
+ letter-spacing: 0.1px;
23785
+ }
23786
+ .vr-cli-action-button.is-cta svg {
23787
+ width: 16px;
23788
+ height: 16px;
23789
+ }
23790
+ .vr-cli-action-button.is-cta.is-pending {
23791
+ border-color: rgba(168, 85, 247, 0.65);
23792
+ animation: vr-cli-cta-pulse 2.2s ease-in-out infinite;
23793
+ }
23794
+ @keyframes vr-cli-cta-pulse {
23795
+ 0%, 100% { box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3), 0 5px 16px rgba(124, 58, 237, 0.22); }
23796
+ 50% { box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.6), 0 8px 22px rgba(124, 58, 237, 0.42); }
23797
+ }
23793
23798
  .vr-cli-strip button.is-connect-target {
23794
23799
  border-color: rgba(248, 250, 252, 0.34);
23795
23800
  box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.08);