@eddyskywalker/dsh-chatgpt-subscription 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.
- package/lib/client.js.map +1 -1
- package/lib/index.js +8 -3
- package/lib/types/compat.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -891,7 +891,7 @@ const ROUTE_PREFIX$6 = "/api/dsh-chatgpt-subscription";
|
|
|
891
891
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
892
892
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
893
893
|
*/
|
|
894
|
-
const PLUGIN_VERSION = "1.1.
|
|
894
|
+
const PLUGIN_VERSION = "1.1.1";
|
|
895
895
|
const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
|
|
896
896
|
const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
|
|
897
897
|
const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
|
|
@@ -28190,17 +28190,22 @@ function renderMessages(messages, indices, images) {
|
|
|
28190
28190
|
}
|
|
28191
28191
|
return blocks;
|
|
28192
28192
|
}
|
|
28193
|
+
/** Source kind the harness stamps on the user message a compaction leaves behind. */
|
|
28194
|
+
const COMPACT_CHECKPOINT_KIND = "compact-checkpoint";
|
|
28193
28195
|
/**
|
|
28194
28196
|
* Whether this `user` message was injected by something other than a human.
|
|
28195
28197
|
*
|
|
28196
28198
|
* A message without a source kind is treated as human: older harness generations
|
|
28197
28199
|
* do not stamp one, and mistaking the real request for synthetic context is worse
|
|
28198
|
-
* than the reverse.
|
|
28200
|
+
* than the reverse. A compaction checkpoint is the other message that must count:
|
|
28201
|
+
* it replaces the span that carried the task, so after an in-turn compaction it is
|
|
28202
|
+
* the only message left saying what the turn is about. Filtered as noise, the
|
|
28203
|
+
* cold replay carried no request at all and the agent answered that none was given.
|
|
28199
28204
|
*/
|
|
28200
28205
|
function isSyntheticUserMessage$1(message) {
|
|
28201
28206
|
if (message.role !== "user") return false;
|
|
28202
28207
|
const kind = message.source?.kind;
|
|
28203
|
-
return typeof kind === "string" && kind !== "user";
|
|
28208
|
+
return typeof kind === "string" && kind !== "user" && kind !== COMPACT_CHECKPOINT_KIND;
|
|
28204
28209
|
}
|
|
28205
28210
|
/** Index of the newest message a human actually wrote. */
|
|
28206
28211
|
function lastHumanRequestIndex(messages) {
|
package/lib/types/compat.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
|
|
|
76
76
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
77
77
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
78
78
|
*/
|
|
79
|
-
export declare const PLUGIN_VERSION: "1.1.
|
|
79
|
+
export declare const PLUGIN_VERSION: "1.1.1";
|
|
80
80
|
export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
|
|
81
81
|
export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
|
|
82
82
|
export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
|
package/package.json
CHANGED