codex-overleaf-link 2.3.2 → 2.3.4

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <h1>Codex Overleaf Link</h1>
4
4
  <p><strong>Empower Overleaf with Codex.</strong></p>
5
5
  <p>
6
- <img src="https://img.shields.io/badge/version-2.3.2-blue" alt="version">
6
+ <img src="https://img.shields.io/badge/version-2.3.4-blue" alt="version">
7
7
  <img src="https://img.shields.io/badge/platform-macOS%20%2F%20Windows%20%2F%20Linux-lightgrey" alt="platform">
8
8
  <img src="https://img.shields.io/badge/chrome-MV3-green" alt="chrome manifest v3">
9
9
  <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="node version">
@@ -38,14 +38,14 @@ One command installs the managed native host **and** managed extension runtime.
38
38
  macOS / Linux:
39
39
 
40
40
  ```bash
41
- CODEX_OVERLEAF_REF=v2.3.2 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.2/install.sh)"
41
+ CODEX_OVERLEAF_REF=v2.3.4 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.4/install.sh)"
42
42
  ```
43
43
 
44
44
  Windows PowerShell:
45
45
 
46
46
  ```powershell
47
- iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.2/install.ps1 -OutFile install.ps1
48
- $env:CODEX_OVERLEAF_REF='v2.3.2'
47
+ iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.4/install.ps1 -OutFile install.ps1
48
+ $env:CODEX_OVERLEAF_REF='v2.3.4'
49
49
  powershell -ExecutionPolicy Bypass -File install.ps1
50
50
  ```
51
51
 
@@ -56,7 +56,7 @@ Then, in the `chrome://extensions` tab the script opened: enable **Developer mod
56
56
  `npm exec` installs the same managed native host and extension runtime without keeping a source checkout. Use it if you prefer a pinned npm package.
57
57
 
58
58
  ```bash
59
- npm exec --yes codex-overleaf-link@2.3.2 -- install-managed
59
+ npm exec --yes codex-overleaf-link@2.3.4 -- install-managed
60
60
  ```
61
61
 
62
62
  Then, in `chrome://extensions`, enable **Developer mode**, click **Load unpacked**, and select the managed extension path printed by the command. The Release extension zip remains available for explicitly unmanaged/manual installations.
@@ -88,9 +88,9 @@ npm installs, updates, and uninstalls the coordinated managed extension/native p
88
88
 
89
89
  | Action | Command |
90
90
  |--------|---------|
91
- | Install / update | `npm exec --yes codex-overleaf-link@2.3.2 -- install-managed` |
92
- | Diagnose | `npm exec --yes codex-overleaf-link@2.3.2 -- doctor` |
93
- | Uninstall | `npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed` |
91
+ | Install / update | `npm exec --yes codex-overleaf-link@2.3.4 -- install-managed` |
92
+ | Diagnose | `npm exec --yes codex-overleaf-link@2.3.4 -- doctor` |
93
+ | Uninstall | `npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed` |
94
94
 
95
95
  Use `--extension-id <chrome-extension-id>` only for a custom/dev unpacked extension id that differs from the official bundled id.
96
96
 
@@ -104,13 +104,13 @@ Managed installations discover signed stable updates automatically and apply the
104
104
 
105
105
  v2.2.0 introduces Bootstrap protocol 2. Existing v2.1.x managed installations must run the pinned `install-managed` command once, then reload the extension and Overleaf. Later protocol-2 releases use the in-product signed updater for ordinary runtime, style, vendor, and Native Host feature changes.
106
106
 
107
- The v2.3.2 GitHub Release contains:
107
+ The v2.3.4 GitHub Release contains:
108
108
 
109
- - `codex-overleaf-link-extension-v2.3.2.zip`: loadable Chrome extension package for manual unpacked installation.
110
- - `codex-overleaf-native-host-v2.3.2.tar.gz`: native host runtime files used by the installer and release verification.
111
- - `codex-overleaf-link-2.3.2.tgz`: npm native host CLI package for pinned install, doctor, and uninstall flows.
112
- - `install.sh`: release-pinned macOS / Linux installer that defaults to `v2.3.2` when run directly from the release artifact.
113
- - `install.ps1`: release-pinned Windows PowerShell installer that defaults to `v2.3.2` when run directly from the release artifact.
109
+ - `codex-overleaf-link-extension-v2.3.4.zip`: loadable Chrome extension package for manual unpacked installation.
110
+ - `codex-overleaf-native-host-v2.3.4.tar.gz`: native host runtime files used by the installer and release verification.
111
+ - `codex-overleaf-link-2.3.4.tgz`: npm native host CLI package for pinned install, doctor, and uninstall flows.
112
+ - `install.sh`: release-pinned macOS / Linux installer that defaults to `v2.3.4` when run directly from the release artifact.
113
+ - `install.ps1`: release-pinned Windows PowerShell installer that defaults to `v2.3.4` when run directly from the release artifact.
114
114
  - `uninstall-native-host.mjs`: native host uninstaller that removes the Chrome Native Messaging manifest, bridge executable, and runtime copy.
115
115
  - `nativeHostPlatform.js`, `manifest.js`, `runtimeInstaller.js`: helper files required by the loose uninstaller asset.
116
116
  - `SHA256SUMS` and `release-manifest.json`: checksum and artifact metadata for release verification.
@@ -121,7 +121,7 @@ The v2.3.2 GitHub Release contains:
121
121
  Remove the native host (use `--browser chromium` on Linux Chromium):
122
122
 
123
123
  ```bash
124
- npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed
124
+ npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed
125
125
  ```
126
126
 
127
127
  The same command works on Windows PowerShell. If you installed from a manual checkout or source installer, you can also run `npm run uninstall:native` inside the repo, use `node ~/.codex-overleaf/source/scripts/uninstall-native-host.mjs` on macOS / Linux, or use `node $env:LOCALAPPDATA\CodexOverleaf\source\scripts\uninstall-native-host.mjs` on Windows PowerShell.
@@ -156,13 +156,13 @@ Then remove the extension from `chrome://extensions`. To delete local data: on m
156
156
  Linux Chromium install or update:
157
157
 
158
158
  ```bash
159
- CODEX_OVERLEAF_REF=v2.3.2 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.2/install.sh)" -- --browser chromium
159
+ CODEX_OVERLEAF_REF=v2.3.4 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.3.4/install.sh)" -- --browser chromium
160
160
  ```
161
161
 
162
162
  Linux Chromium uninstall:
163
163
 
164
164
  ```bash
165
- npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed --browser chromium
165
+ npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed --browser chromium
166
166
  ```
167
167
 
168
168
  ## Features
@@ -298,7 +298,7 @@ Composer attachments are turn-scoped Codex context. Limits are 8 attachments per
298
298
  Re-run any [native host installer](#install), reload the extension in `chrome://extensions`, then refresh the Overleaf tab. This also fixes extension/native version mismatch and native protocol mismatch.
299
299
 
300
300
  ```bash
301
- npm exec --yes codex-overleaf-link@2.3.2 -- install-managed
301
+ npm exec --yes codex-overleaf-link@2.3.4 -- install-managed
302
302
  ```
303
303
 
304
304
  **The Windows popup or panel shows a Bash recovery command**
@@ -347,8 +347,8 @@ Use this matrix for release-candidate signoff and compatibility reports. Record
347
347
  | Browser/channel/version | Google Chrome channel and version. | Google Chrome channel and version. | Google Chrome channel and version. | Chromium channel/package and version. |
348
348
  | Install mode | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout; native host installed with `--browser chromium`. |
349
349
  | Extension id | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. |
350
- | Installer/update command | `npm exec --yes codex-overleaf-link@2.3.2 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- install-managed --browser chromium` |
351
- | Uninstall command | `npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-managed --browser chromium` |
350
+ | Installer/update command | `npm exec --yes codex-overleaf-link@2.3.4 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- install-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- install-managed --browser chromium` |
351
+ | Uninstall command | `npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-managed --browser chromium` |
352
352
  | Manifest/registry path | `~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.codex.overleaf.json` | `HKCU\Software\Google\Chrome\NativeMessagingHosts\com.codex.overleaf` -> `%LOCALAPPDATA%\CodexOverleaf\native-host-runtime\com.codex.overleaf.json` | `~/.config/google-chrome/NativeMessagingHosts/com.codex.overleaf.json` | `~/.config/chromium/NativeMessagingHosts/com.codex.overleaf.json` |
353
353
  | Bridge/runtime/source path | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. | Bridge `%LOCALAPPDATA%\CodexOverleaf\codex-overleaf-bridge.cmd`; runtime `%LOCALAPPDATA%\CodexOverleaf\native-host-runtime`; source `%LOCALAPPDATA%\CodexOverleaf\source`. | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. |
354
354
  | Node/Git/Codex/TeX | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. |
@@ -384,7 +384,7 @@ Contributions are welcome. Please open an issue before submitting large changes
384
384
  The recommended v1.9 installation owns one stable unpacked-extension directory and a versioned native-host directory:
385
385
 
386
386
  ```bash
387
- npm exec --yes codex-overleaf-link@2.3.2 -- install-managed
387
+ npm exec --yes codex-overleaf-link@2.3.4 -- install-managed
388
388
  ```
389
389
 
390
390
  Load the printed extension path once from `chrome://extensions`. Starting with the next signed stable release, Codex Overleaf Link checks GitHub Releases automatically, downloads and verifies the coordinated extension/native-host bundle, waits until every connected Overleaf tab is saved and idle, and then updates both components together. A failed health check restores the previous version automatically.
@@ -394,11 +394,11 @@ The stable updater ignores drafts and prereleases, performs no telemetry, and ca
394
394
  The legacy native-only installer remains available for source or unmanaged extension directories:
395
395
 
396
396
  ```bash
397
- npm exec --yes codex-overleaf-link@2.3.2 -- install-native
397
+ npm exec --yes codex-overleaf-link@2.3.4 -- install-native
398
398
  ```
399
399
 
400
400
  Legacy native-only installations can be removed with:
401
401
 
402
402
  ```bash
403
- npm exec --yes codex-overleaf-link@2.3.2 -- uninstall-native
403
+ npm exec --yes codex-overleaf-link@2.3.4 -- uninstall-native
404
404
  ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Codex Overleaf Link",
4
- "version": "2.3.2",
4
+ "version": "2.3.4",
5
5
  "description": "Connect the active Overleaf project to a local Codex bridge.",
6
6
  "icons": {
7
7
  "16": "assets/icons/icon16.png",
@@ -383,7 +383,8 @@
383
383
  getState: () => state,
384
384
  setState: next => { state = next; },
385
385
  getCurrentRunView: () => currentRunView,
386
- getSettingsPanelInstance: () => settingsPanelInstance
386
+ getSettingsPanelInstance: () => settingsPanelInstance,
387
+ prepareRetryReplacement: run => prepareRetryReplacement(run)
387
388
  });
388
389
  const {
389
390
  showUndoFileSelection,
@@ -432,6 +433,7 @@
432
433
  cssEscape,
433
434
  renderMarkdownInlineText,
434
435
  renderMarkdownBlockText,
436
+ decorateCompletionReport: Modules.MarkdownDomRenderer.decorateCompletionReport,
435
437
  sanitizeAssistantVisibleText,
436
438
  sanitizeAssistantVisibleValue,
437
439
  buildMarkdownInlineNodes,
@@ -839,6 +841,7 @@
839
841
  let state = null;
840
842
  let storageKey = LEGACY_STORAGE_KEY;
841
843
  let currentRunView = null;
844
+ let pendingRetryReplacement = null;
842
845
  let runQueueScheduler = null;
843
846
  let runInputCoordinator = null;
844
847
  const activeTurnControl = ActiveTurnControl.create({ chrome });
@@ -935,6 +938,13 @@
935
938
  sendResponse?.(getPanelStateResponse());
936
939
  return;
937
940
  }
941
+ if (message?.type === 'codex-overleaf/toggle-launcher') {
942
+ const visible = !PanelRenderer.isLauncherVisible(panelRendererInstance);
943
+ PanelRenderer.setLauncherVisible(panelRendererInstance, visible, { persist: true });
944
+ if (!visible) closePanel();
945
+ sendResponse?.(getPanelStateResponse());
946
+ return;
947
+ }
938
948
  if (message?.type === 'codex-overleaf/toggle-panel') {
939
949
  if (isPanelOpen()) {
940
950
  closePanel();
@@ -1185,7 +1195,12 @@
1185
1195
  maxWidth: PANEL_MAX_WIDTH,
1186
1196
  pageMinWidth: PAGE_MIN_WIDTH,
1187
1197
  initialWidth: state?.panelWidth || PANEL_DEFAULT_WIDTH,
1198
+ chromeApi: chrome,
1199
+ launcherLabel: tx('Show or hide Codex panel', '显示或隐藏 Codex 边栏'),
1188
1200
  callbacks: {
1201
+ onLauncherToggle: () => ensurePanelOpen(),
1202
+ onClosePanel: () => closePanel(),
1203
+ onLauncherVisibilityChange: visible => { if (!visible) closePanel(); },
1189
1204
  onRefresh: () => refreshProbe({ userInitiated: true }),
1190
1205
  onNewSession: () => startNewSession(),
1191
1206
  onChangeHistory: () => openChangeHistory(),
@@ -1363,7 +1378,8 @@
1363
1378
  function getPanelStateResponse() {
1364
1379
  return {
1365
1380
  ok: true,
1366
- open: isPanelOpen()
1381
+ open: isPanelOpen(),
1382
+ launcherVisible: PanelRenderer.isLauncherVisible(panelRendererInstance)
1367
1383
  };
1368
1384
  }
1369
1385
 
@@ -1788,6 +1804,12 @@
1788
1804
  // Freeze submitted run identity before the panel can change during the run.
1789
1805
  const submittedMode = executionSnapshot.mode;
1790
1806
  const submittedRequireReviewing = executionSnapshot.requireReviewing === true;
1807
+ const replaceRunId = queuedInput ? '' : runController.resolveRetryReplacement({
1808
+ candidate: pendingRetryReplacement,
1809
+ activeSessionId: state.activeSessionId,
1810
+ runs: state.runs,
1811
+ projectRunSettlement: run => WritebackSettlement.projectRunSettlement(run)
1812
+ });
1791
1813
 
1792
1814
  runCancellationRequested = false;
1793
1815
  runCancellationController = new AbortController();
@@ -1801,8 +1823,10 @@
1801
1823
  executionSnapshot,
1802
1824
  attachments: submittedAttachments,
1803
1825
  skillInvocation: submittedSkillInvocation,
1804
- queueItemId: queuedInput?.id || ''
1826
+ queueItemId: queuedInput?.id || '',
1827
+ replaceRunId
1805
1828
  });
1829
+ if (!queuedInput) pendingRetryReplacement = null;
1806
1830
  const runSessionId = currentRunView.sessionId;
1807
1831
  let runAuditDraft = null;
1808
1832
  try {
@@ -6126,6 +6150,17 @@
6126
6150
  renderPendingInputs();
6127
6151
  }
6128
6152
 
6153
+ function prepareRetryReplacement(run) {
6154
+ const sessionId = state?.activeSessionId || '';
6155
+ const source = findRunRecord(run?.id, sessionId);
6156
+ const eligible = source && runController.isRetryReplacementEligible(
6157
+ source,
6158
+ WritebackSettlement.projectRunSettlement(source)
6159
+ );
6160
+ pendingRetryReplacement = eligible ? { sessionId, runId: source.id } : null;
6161
+ return Boolean(eligible);
6162
+ }
6163
+
6129
6164
  function startRunView({
6130
6165
  task,
6131
6166
  mode,
@@ -6133,6 +6168,7 @@
6133
6168
  reasoningEffort,
6134
6169
  speedTier,
6135
6170
  queueItemId = '',
6171
+ replaceRunId = '',
6136
6172
  executionSnapshot = null
6137
6173
  }) {
6138
6174
  let attachments = [];
@@ -6184,13 +6220,14 @@
6184
6220
  }
6185
6221
  : {};
6186
6222
  state = updateActiveSession(state, {
6187
- runs: [...(state.runs || []), record].slice(-20),
6223
+ runs: runController.replaceRunForRetry(state.runs, replaceRunId, record),
6188
6224
  ...titlePatch
6189
6225
  });
6190
- saveStateSoon();
6226
+ saveStateSoon(replaceRunId ? 0 : 120);
6191
6227
 
6192
6228
  const log = panel.querySelector('[data-log]');
6193
6229
  removeEmptyRunsMessage(log);
6230
+ if (replaceRunId) log.querySelector(`[data-run-id="${cssEscape(replaceRunId)}"]`)?.remove();
6194
6231
  const root = renderRunCard(record);
6195
6232
  log.append(root);
6196
6233
  scrollLogToBottom({ force: true });