copilotoffice 1.1.0 → 1.1.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.
@@ -5988,8 +5988,8 @@ async function startTerminalForAgent(officeId, agentId, workingDir, cols, rows,
5988
5988
  });
5989
5989
  if (!shellOnlyMode && terminalBackend.name === "node-pty") {
5990
5990
  setTimeout(() => {
5991
- console.log(`[TermServer] Starting copilot --resume for ${ck}: ${sessionId}`);
5992
- proc.write(`copilot --resume ${sessionId}\r`);
5991
+ console.log(`[TermServer] Starting copilot --session-id for ${ck}: ${sessionId}`);
5992
+ proc.write(`copilot --session-id ${sessionId}\r`);
5993
5993
  }, 500);
5994
5994
  }
5995
5995
  return { success: true, pid: proc.pid, sessionId };
@@ -6127,7 +6127,7 @@ async function handleMessage(msg) {
6127
6127
  }
6128
6128
  }
6129
6129
  try {
6130
- (0, import_child_process2.spawn)("wt", ["-d", cwd, "copilot", "--resume", sid], { detached: true, stdio: "ignore" }).unref();
6130
+ (0, import_child_process2.spawn)("wt", ["-d", cwd, "copilot", "--session-id", sid], { detached: true, stdio: "ignore" }).unref();
6131
6131
  send({ type: "response", requestId: msg.requestId, result: { success: true } });
6132
6132
  } catch (error) {
6133
6133
  send({ type: "response", requestId: msg.requestId, result: { success: false, error: String(error) } });
@@ -148760,7 +148760,7 @@ WARNING: This link could potentially be dangerous`)) {
148760
148760
  const el = this.spriteCardElement?.querySelector(".session-id-display");
148761
148761
  if (el && this.sessionId) {
148762
148762
  el.textContent = this.sessionId;
148763
- el.title = `Click to copy. Resume with: copilot --resume ${this.sessionId}`;
148763
+ el.title = `Click to copy. Resume with: copilot --session-id ${this.sessionId}`;
148764
148764
  el.onclick = () => this.copySessionId();
148765
148765
  }
148766
148766
  }
@@ -149503,7 +149503,22 @@ WARNING: This link could potentially be dangerous`)) {
149503
149503
  this.terminal.open(this.terminalDiv);
149504
149504
  this.fitAndResizeTerminal();
149505
149505
  this.terminal.attachCustomKeyEventHandler((event) => {
149506
- if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "v" && event.type === "keydown") {
149506
+ const isModifierPressed = event.ctrlKey || event.metaKey;
149507
+ const key = event.key.toLowerCase();
149508
+ if (event.type !== "keydown" || !isModifierPressed) return true;
149509
+ if (key === "c") {
149510
+ const selectedText = this.terminal?.hasSelection() ? this.terminal.getSelection() : "";
149511
+ if (!selectedText) {
149512
+ return true;
149513
+ }
149514
+ event.preventDefault();
149515
+ event.stopPropagation();
149516
+ navigator.clipboard.writeText(selectedText).catch((err) => {
149517
+ console.warn("[Terminal] Clipboard write failed:", err);
149518
+ });
149519
+ return false;
149520
+ }
149521
+ if (key === "v") {
149507
149522
  if (this.isReadOnly) return false;
149508
149523
  event.preventDefault();
149509
149524
  event.stopPropagation();
@@ -156309,7 +156324,21 @@ Terminal error: ${error?.message || String(error)}`);
156309
156324
  this.terminalDivEl.id = "serious-terminal-container";
156310
156325
  this.terminal.open(this.terminalDivEl);
156311
156326
  this.terminal.attachCustomKeyEventHandler((event) => {
156312
- if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "v" && event.type === "keydown") {
156327
+ const isModifierPressed = event.ctrlKey || event.metaKey;
156328
+ const key = event.key.toLowerCase();
156329
+ if (event.type !== "keydown" || !isModifierPressed) return true;
156330
+ if (key === "c") {
156331
+ const selectedText = this.terminal?.hasSelection() ? this.terminal.getSelection() : "";
156332
+ if (!selectedText) {
156333
+ return true;
156334
+ }
156335
+ event.preventDefault();
156336
+ event.stopPropagation();
156337
+ navigator.clipboard.writeText(selectedText).catch(() => {
156338
+ });
156339
+ return false;
156340
+ }
156341
+ if (key === "v") {
156313
156342
  event.preventDefault();
156314
156343
  event.stopPropagation();
156315
156344
  navigator.clipboard.readText().then((text) => {
@@ -156318,6 +156347,12 @@ Terminal error: ${error?.message || String(error)}`);
156318
156347
  });
156319
156348
  return false;
156320
156349
  }
156350
+ if (key === "f") {
156351
+ event.preventDefault();
156352
+ event.stopPropagation();
156353
+ this.toggleFullWidth();
156354
+ return false;
156355
+ }
156321
156356
  return true;
156322
156357
  });
156323
156358
  this.terminal.onData((data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotoffice",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A 2D pixel-art game where you interact with AI agents in a virtual office",
5
5
  "main": "dist/electron/main.js",
6
6
  "bin": {