@youdie006/prodex 0.29.0 → 0.30.0

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-pro.js CHANGED
@@ -838,7 +838,14 @@ export async function runAskProCommand(rest, io) {
838
838
  // reasoning axis explicitly suppresses the default for the other axis, and
839
839
  // pinning --target-url suppresses a default project (it would navigate away
840
840
  // from the confirmed tab).
841
- const selectionModel = explicitModel ?? browserDefaults?.model;
841
+ // Choosing an effort IS choosing the reasoning axis, and ChatGPT deselects
842
+ // Pro the moment an effort is set - so applying a pinned Pro first would
843
+ // select a model only to undo it, and a quick question would still pay for
844
+ // the Pro selection dance.
845
+ // --pro-mode refines Pro, so it keeps a pinned Pro. --effort replaces it:
846
+ // ChatGPT deselects Pro the moment an effort is set, so applying the pinned
847
+ // Pro first would select a model only to undo it.
848
+ const selectionModel = explicitModel ?? (explicitEffort !== undefined ? undefined : browserDefaults?.model);
842
849
  const selectionProjectNew = explicitProjectNew;
843
850
  // A persisted default project APPLIES under --new-chat: since 0.16.11 a
844
851
  // fresh chat inside the project is exactly what "--new-chat + project"
package/dist/cli.js CHANGED
@@ -74,6 +74,10 @@ async function runInteractiveUi(io) {
74
74
  const { loadBrowserDefaults } = await import("./config.js");
75
75
  return (await loadBrowserDefaults(io.cwd).catch(() => undefined))?.project;
76
76
  },
77
+ pinnedModel: async () => {
78
+ const { loadBrowserDefaults } = await import("./config.js");
79
+ return (await loadBrowserDefaults(io.cwd).catch(() => undefined))?.model;
80
+ },
77
81
  listConversations: async () => {
78
82
  const { listRecentChatGptConversations } = await import("./chatgpt-browser.js");
79
83
  return listRecentChatGptConversations({});
package/dist/tui-flow.js CHANGED
@@ -32,3 +32,18 @@ export function destinationChoices(pinnedProject) {
32
32
  ...(pinnedProject ? [{ id: "no-project", label: "New chat, ignoring the pinned project" }] : [])
33
33
  ];
34
34
  }
35
+ /**
36
+ * prodex is named for Pro, but the same signed-in browser runs the ordinary
37
+ * reasoning levels, and a one-line question does not want minutes of Pro.
38
+ * Offered only for an ordinary chat: the tool kinds bring their own pipeline,
39
+ * and ChatGPT deselects Pro as soon as an effort is set.
40
+ */
41
+ export function effortChoices(pinnedModel) {
42
+ return [
43
+ { label: pinnedModel ? `Keep ${pinnedModel}` : "Keep the current selection", hint: "whatever this repo pinned" },
44
+ { effort: "instant", label: "Instant", hint: "seconds, for a quick question" },
45
+ { effort: "medium", label: "Medium" },
46
+ { effort: "high", label: "High" },
47
+ { effort: "max", label: "Extra high", hint: "slowest of the standard levels" }
48
+ ];
49
+ }
package/dist/tui-run.js CHANGED
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import readline from "node:readline";
10
10
  import { renderBanner } from "./banner.js";
11
- import { destinationChoices, SEND_KINDS } from "./tui-flow.js";
11
+ import { destinationChoices, effortChoices, SEND_KINDS } from "./tui-flow.js";
12
12
  import { consultArgsFromChoices, conversationThreadUrl, moveCursor, progressLabel, renderContextPanel, renderProgressBar, renderSelectList } from "./tui.js";
13
13
  const ESC = "";
14
14
  const CLEAR = `${ESC}[2J${ESC}[H`;
@@ -152,6 +152,7 @@ export async function runInteractiveConsult(io, deps) {
152
152
  // being read, so no step waits on the network.
153
153
  const contextPromise = deps.describeContext?.().catch(() => []);
154
154
  const pinnedPromise = deps.pinnedProject?.().catch(() => undefined);
155
+ const pinnedModelPromise = deps.pinnedModel?.().catch(() => undefined);
155
156
  const conversationsPromise = deps.listConversations?.().catch(() => []);
156
157
  const kindChoice = await pick(io, {
157
158
  title: "What kind of send is this?",
@@ -161,6 +162,19 @@ export async function runInteractiveConsult(io, deps) {
161
162
  if (kindChoice === undefined)
162
163
  return cancel(io);
163
164
  const tools = SEND_KINDS[kindChoice].tools;
165
+ // Only an ordinary chat has a reasoning level to choose: the tool kinds
166
+ // bring their own pipeline, and an effort would deselect Pro under them.
167
+ let effort;
168
+ if (SEND_KINDS[kindChoice].id === "chat") {
169
+ const efforts = effortChoices(await pinnedModelPromise);
170
+ const chosen = await pick(io, {
171
+ title: "How much reasoning?",
172
+ options: efforts.map((entry) => ({ label: entry.label, ...(entry.hint ? { hint: entry.hint } : {}) }))
173
+ }, banner);
174
+ if (chosen === undefined)
175
+ return cancel(io);
176
+ effort = efforts[chosen].effort;
177
+ }
164
178
  const rows = (await contextPromise) ?? [];
165
179
  if (rows.length > 0)
166
180
  header = `${banner}${renderContextPanel(rows, { color: colorEnabled(), width: terminalWidth() })}\n\n`;
@@ -225,6 +239,7 @@ export async function runInteractiveConsult(io, deps) {
225
239
  projectMode,
226
240
  ...(projectName ? { projectName } : {}),
227
241
  ...(targetUrl ? { targetUrl } : {}),
242
+ ...(effort ? { effort } : {}),
228
243
  tools,
229
244
  newChat: !targetUrl
230
245
  };
package/dist/tui.js CHANGED
@@ -28,6 +28,8 @@ export function consultArgsFromChoices(choices) {
28
28
  // or a fresh chat alongside a pinned target, and rightly so.
29
29
  if (choices.targetUrl) {
30
30
  args.push("--target-url", choices.targetUrl, "--confirm-target");
31
+ if (choices.effort)
32
+ args.push("--effort", choices.effort);
31
33
  for (const attachment of choices.attachments ?? [])
32
34
  args.push("--attach", attachment);
33
35
  for (const tool of choices.tools)
@@ -37,6 +39,8 @@ export function consultArgsFromChoices(choices) {
37
39
  }
38
40
  if (choices.newChat)
39
41
  args.push("--new-chat");
42
+ if (choices.effort)
43
+ args.push("--effort", choices.effort);
40
44
  if (choices.projectMode === "existing" || choices.projectMode === "new") {
41
45
  const name = choices.projectName?.trim();
42
46
  if (!name)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youdie006/prodex",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Local receipt bus for coordinating Codex execution with ChatGPT Pro/Projects consultation.",
5
5
  "author": "youdie006",
6
6
  "license": "MIT",