@diegopetrucci/pi-extensions 0.1.35 → 0.1.36
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.
|
@@ -26,14 +26,9 @@ Fast mode is only injected when all of these are true:
|
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
28
|
/fast
|
|
29
|
-
/fast status
|
|
30
|
-
/fast on
|
|
31
|
-
/fast off
|
|
32
|
-
/fast auto
|
|
33
|
-
/fast toggle
|
|
34
29
|
```
|
|
35
30
|
|
|
36
|
-
Run `/fast`
|
|
31
|
+
Run `/fast` to toggle Fast mode on or off for the current session/runtime. The command reports the new state in chat, and the footer shows `fast` while Fast mode is active for an eligible model.
|
|
37
32
|
|
|
38
33
|
The extension defaults to off so installing the full collection does not accidentally spend Fast-mode credits.
|
|
39
34
|
|
|
@@ -11,7 +11,6 @@ const PROVIDER_ID = "openai-codex";
|
|
|
11
11
|
const API_ID = "openai-codex-responses";
|
|
12
12
|
const FAST_SERVICE_TIER = "priority";
|
|
13
13
|
const SUPPORTED_MODELS = new Set(["gpt-5.4", "gpt-5.5"]);
|
|
14
|
-
const COMMANDS = ["status", "on", "off", "auto", "toggle"];
|
|
15
14
|
|
|
16
15
|
const DEFAULT_CONFIG: OpenAIFastConfig = {
|
|
17
16
|
enabled: false,
|
|
@@ -241,62 +240,20 @@ export default function openAIFastExtension(pi: ExtensionAPI) {
|
|
|
241
240
|
});
|
|
242
241
|
|
|
243
242
|
pi.registerCommand("fast", {
|
|
244
|
-
description: "
|
|
245
|
-
getArgumentCompletions: (
|
|
246
|
-
const normalized = prefix.trim().toLowerCase();
|
|
247
|
-
const matches = COMMANDS.filter((command) => command.startsWith(normalized));
|
|
248
|
-
return matches.length > 0 ? matches.map((value) => ({ value, label: value })) : null;
|
|
249
|
-
},
|
|
243
|
+
description: "Toggle OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4/GPT-5.5",
|
|
244
|
+
getArgumentCompletions: () => null,
|
|
250
245
|
handler: async (args, ctx) => {
|
|
251
246
|
const state = getState(ctx);
|
|
252
|
-
|
|
247
|
+
const action = args.trim();
|
|
253
248
|
|
|
254
249
|
if (!action) {
|
|
255
|
-
if (!ctx.hasUI) {
|
|
256
|
-
action = "status";
|
|
257
|
-
} else {
|
|
258
|
-
const selection = await ctx.ui.select("OpenAI Fast mode", COMMANDS);
|
|
259
|
-
if (!selection) return;
|
|
260
|
-
action = selection;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (action === "on" || action === "enable") {
|
|
265
|
-
state.override = "on";
|
|
266
|
-
updateStatus(ctx, state);
|
|
267
|
-
ctx.ui.notify(getStatusMessage(ctx, state), "info");
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
if (action === "off" || action === "disable") {
|
|
272
|
-
state.override = "off";
|
|
273
|
-
updateStatus(ctx, state);
|
|
274
|
-
ctx.ui.notify(getStatusMessage(ctx, state), "info");
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
if (action === "auto" || action === "default") {
|
|
279
|
-
state.override = "auto";
|
|
280
|
-
state.config = loadConfig(ctx.cwd);
|
|
281
|
-
updateStatus(ctx, state);
|
|
282
|
-
ctx.ui.notify(getStatusMessage(ctx, state), "info");
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (action === "toggle") {
|
|
287
250
|
state.override = isFastEnabled(state) ? "off" : "on";
|
|
288
251
|
updateStatus(ctx, state);
|
|
289
252
|
ctx.ui.notify(getStatusMessage(ctx, state), "info");
|
|
290
253
|
return;
|
|
291
254
|
}
|
|
292
255
|
|
|
293
|
-
|
|
294
|
-
updateStatus(ctx, state);
|
|
295
|
-
ctx.ui.notify(getStatusMessage(ctx, state), "info");
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
ctx.ui.notify("Usage: /fast on | off | auto | toggle | status", "warning");
|
|
256
|
+
ctx.ui.notify("Usage: /fast", "warning");
|
|
300
257
|
},
|
|
301
258
|
});
|
|
302
259
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-openai-fast",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A pi extension that enables OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4 and GPT-5.5 by injecting the priority service tier.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-extensions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "A collection of pi extensions for context management, workflow audits, review-comment triage, notifications, brrr push alerts, safety guards, GitHub research, repo-local knowledge, todos, tool rendering, and model/provider helpers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|