@willh/copilotstatusline 0.2.0 → 0.2.1

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.
@@ -15820,6 +15820,14 @@ function styleText(value, foreground, background = "none", bold = false, colorLe
15820
15820
  return codes.length === 0 ? value : `\x1B[${codes.join(";")}m${value}\x1B[0m`;
15821
15821
  }
15822
15822
  function powerlineArrow(value, foreground, background, colorLevel) {
15823
+ if (colorLevel === 0 || value === "") {
15824
+ return value;
15825
+ }
15826
+ if (background === "none") {
15827
+ const foregroundCode = foregroundCodes[foreground];
15828
+ const codes = foregroundCode === null ? [49] : [foregroundCode, 49];
15829
+ return `\x1B[${codes.join(";")}m${value}\x1B[0m`;
15830
+ }
15823
15831
  return styleText(value, foreground, background, false, colorLevel);
15824
15832
  }
15825
15833
  var foregroundCodes, backgroundCodes;
@@ -54304,7 +54312,7 @@ var package_default;
54304
54312
  var init_package = __esm(() => {
54305
54313
  package_default = {
54306
54314
  name: "@willh/copilotstatusline",
54307
- version: "0.2.0",
54315
+ version: "0.2.1",
54308
54316
  bugs: {
54309
54317
  url: "https://github.com/doggy8088/copilotstatusline/issues"
54310
54318
  },
@@ -55296,6 +55304,17 @@ var init_StatusLinePreview = __esm(async () => {
55296
55304
  };
55297
55305
  });
55298
55306
 
55307
+ // src/tui/components/widget-editor-input.ts
55308
+ function getEditorGlobalKeyAction(key) {
55309
+ if (key.escape) {
55310
+ return "back";
55311
+ }
55312
+ if (key.ctrl || key.meta) {
55313
+ return "ignore";
55314
+ }
55315
+ return "continue";
55316
+ }
55317
+
55299
55318
  // src/tui/components/WidgetEditor.tsx
55300
55319
  import { randomUUID } from "node:crypto";
55301
55320
  function makeWidget(type) {
@@ -55479,7 +55498,12 @@ function WidgetEditor({
55479
55498
  }
55480
55499
  return;
55481
55500
  }
55482
- if (key.ctrl || key.meta) {
55501
+ const globalKeyAction = getEditorGlobalKeyAction(key);
55502
+ if (globalKeyAction === "back") {
55503
+ onBack();
55504
+ return;
55505
+ }
55506
+ if (globalKeyAction === "ignore") {
55483
55507
  return;
55484
55508
  }
55485
55509
  if ((key.upArrow || key.downArrow) && widgets.length > 0) {
@@ -55525,8 +55549,6 @@ function WidgetEditor({
55525
55549
  startEditing("prefix");
55526
55550
  } else if (input === "s") {
55527
55551
  startEditing("suffix");
55528
- } else if (key.escape) {
55529
- onBack();
55530
55552
  }
55531
55553
  });
55532
55554
  if (showClearConfirmation) {
@@ -56404,7 +56426,7 @@ var modelSchema = exports_external.union([
56404
56426
  ]);
56405
56427
  var CopilotStatusSchema = exports_external.looseObject({
56406
56428
  session_id: exports_external.string().optional(),
56407
- session_name: exports_external.string().optional(),
56429
+ session_name: exports_external.string().nullable().optional(),
56408
56430
  transcript_path: exports_external.string().optional(),
56409
56431
  cwd: exports_external.string().optional(),
56410
56432
  version: exports_external.string().optional(),
@@ -56456,7 +56478,7 @@ function normalizeCopilotStatus(status) {
56456
56478
  const totalTokens = reportedTotal > 0 ? reportedTotal : inputTokens + outputTokens + cacheReadTokens + cacheWriteTokens + reasoningTokens;
56457
56479
  return {
56458
56480
  sessionId: status.session_id,
56459
- sessionName: status.session_name,
56481
+ sessionName: status.session_name ?? undefined,
56460
56482
  transcriptPath: status.transcript_path,
56461
56483
  cwd: status.cwd ?? status.workspace?.current_dir ?? status.workspace?.project_dir,
56462
56484
  version: status.version,
@@ -56491,7 +56513,7 @@ function normalizeCopilotStatus(status) {
56491
56513
  init_app_settings();
56492
56514
  init_copilot_settings();
56493
56515
  init_renderer();
56494
- var PACKAGE_VERSION = "0.2.0";
56516
+ var PACKAGE_VERSION = "0.2.1";
56495
56517
  async function readStdin() {
56496
56518
  process.stdin.setEncoding("utf8");
56497
56519
  const chunks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willh/copilotstatusline",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "bugs": {
5
5
  "url": "https://github.com/doggy8088/copilotstatusline/issues"
6
6
  },