@youdie006/prodex 0.16.24 → 0.16.25

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.
@@ -1244,6 +1244,20 @@ async function selectProject(cdp, options) {
1244
1244
  throw new Error(`Clicking project "${options.project}" did not navigate the visible tab. If the tab is already inside this project, omit --project and retry.`);
1245
1245
  }
1246
1246
  }
1247
+ if (navigated) {
1248
+ // A sidebar SPA navigation moves the URL to the target project while the
1249
+ // composer can stay bound to the PREVIOUS project's conversation target, so
1250
+ // the send silently creates the thread in the OLD project (reproduced live
1251
+ // via PRODEX_DEBUG_SEND: baseline URL on the requested project, yet the
1252
+ // prompt posted into the project the tab came from). A hard reload of the
1253
+ // project home rebinds the composer to THIS project before we send.
1254
+ const projectHome = await cdp.evaluate("location.href");
1255
+ await cdp.evaluate("location.reload()");
1256
+ const rebound = await waitForExpressionTrue(cdp, `location.href === ${JSON.stringify(projectHome)} && Boolean(document.querySelector('#prompt-textarea,[contenteditable="true"],textarea'))`, PROJECT_NAVIGATION_TIMEOUT_MS);
1257
+ if (!rebound) {
1258
+ throw new Error(`ChatGPT composer did not rebind after entering project "${options.project}"`);
1259
+ }
1260
+ }
1247
1261
  const composerReady = await waitForExpressionTrue(cdp, `Boolean(document.querySelector('#prompt-textarea,[contenteditable="true"],textarea'))`, PROJECT_NAVIGATION_TIMEOUT_MS);
1248
1262
  if (!composerReady) {
1249
1263
  throw new Error(`ChatGPT composer did not appear after entering project "${options.project}"`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youdie006/prodex",
3
- "version": "0.16.24",
3
+ "version": "0.16.25",
4
4
  "description": "Local receipt bus for coordinating Codex execution with ChatGPT Pro/Projects consultation.",
5
5
  "author": "youdie006",
6
6
  "license": "MIT",