Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codex-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function positiveWindow(value: unknown): number | undefined {
/** #5243: which surface produced a codex-aligned window — named in the clamp
* log so "window clamped" stops claiming client metadata when no client
* metadata existed. */
export type CodexWindowSource =
type CodexWindowSource =
| "client-metadata"
| "codex-catalog"
| "codex-models-cache"
Expand Down
5 changes: 3 additions & 2 deletions src/pack-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const PACK_ENTRY_FILE = "bili-pack.json";

const NPM_TIMEOUT_MS = 120_000;

export interface PackInstallOptions {
interface PackInstallOptions {
/** Target `./.billion-context/packs/` instead of the user-dir default. */
project?: boolean;
/** Replace an existing pack file (refused otherwise). */
Expand Down Expand Up @@ -114,7 +114,8 @@ export function installPackFromNpm(spec: string, options: PackInstallOptions = {
const err = error as { stderr?: unknown; message?: string };
stderr = typeof err.stderr === "string" ? err.stderr : "";
if (/ENOENT/.test(String(err.message))) throw new Error("npm was not found on PATH");
const tail = stderr.trim().split("\n").slice(-3).join(" ").slice(0, 300);
const lines = stderr.trim().split("\n");
const tail = lines.slice(Math.max(0, lines.length - 3)).join(" ").slice(0, 300);
throw new Error(`npm install ${trimmed} failed${tail ? `: ${tail}` : ""}`);
}

Expand Down
6 changes: 3 additions & 3 deletions website/config-reference/compress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ entries:
site_en: "\"off\" | \"warn\" | \"repair\" (default repair): reconcile folded state when the client rewinds or rewrites history between turns."
site_zh: "\"off\" | \"warn\" | \"repair\"(默认 repair):客户端在轮次之间回退或改写历史时校准已折叠状态。"
- key: compress.promptPack
type: "string (builtin: \"default\", \"lean\")"
type: "string (builtin: \"default\", \"lean\", \"chat\")"
default: "builtin \"default\""
group: compress
id: cw.ppk
render: compress-row
desc_en: "Compression prompt pack, resolved project pack → user pack → builtin; not gated by acknowledgePromptsRisk."
desc_zh: "压缩提示词包,按 项目包 → 用户包 → 内置 解析;不受 acknowledgePromptsRisk 门控。"
desc_en: "Compression prompt pack, resolved project pack → user pack → shipped pack → builtin; not gated by acknowledgePromptsRisk."
desc_zh: "压缩提示词包,按 项目包 → 用户包 → 随包附带(chat)→ 内置 解析;不受 acknowledgePromptsRisk 门控。"
site_en: "Compression prompt pack, resolved project pack → user pack → builtin. Builtins: \"default\" and \"lean\" (one-line tool descriptions). Not gated by acknowledgePromptsRisk."
site_zh: "压缩提示词包,按 项目包 → 用户包 → 内置 解析。内置:\"default\" 与 \"lean\"(单行工具描述)。不受 acknowledgePromptsRisk 门控。"
- key: compress.tiers
Expand Down
2 changes: 1 addition & 1 deletion website/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h3 data-i18n="d.cf.t_compress">compress — every knob</h3>
<tr><td class="mono">maxSummaryLength</td><td class="mech">number</td><td data-i18n="cw.msl">Hard cap, in characters, on one generated summary (kernel default 20000): longer replies are rejected whole by the kernel check or the external-summary executor. External summarizers receive this exact cap in their instructions (#3635); 0 disables the cap.</td></tr>
<tr><td class="mono">minSummaryLength</td><td class="mech">number</td><td data-i18n="cw.mnl">Floor, in characters, for generated summaries (kernel default 50): shorter replies are rejected whole; 0 disables the floor. External summarizers are held to the same floor (#3635).</td></tr>
<tr><td class="mono">reconcile</td><td class="mech">"off" | "warn" | "repair"</td><td data-i18n="cw.rec">"off" | "warn" | "repair" (default repair): reconcile folded state when the client rewinds or rewrites history between turns.</td></tr>
<tr><td class="mono">promptPack</td><td class="mech">string (builtin: "default", "lean")</td><td data-i18n="cw.ppk">Compression prompt pack, resolved project pack → user pack → builtin. Builtins: "default" and "lean" (one-line tool descriptions). Not gated by acknowledgePromptsRisk.</td></tr>
<tr><td class="mono">promptPack</td><td class="mech">string (builtin: "default", "lean", "chat")</td><td data-i18n="cw.ppk">Compression prompt pack, resolved project pack → user pack → builtin. Builtins: "default" and "lean" (one-line tool descriptions). Not gated by acknowledgePromptsRisk.</td></tr>
<tr><td class="mono">tiers</td><td class="mech">boolean</td><td data-i18n="cw.tiers">On by default: tiered T1→T3 distillation spreads folding cost across generations.</td></tr>
<tr><td class="mono">protectedTools</td><td class="mech">string[]</td><td data-i18n="ct.pt">Hard exclusion across all history: results of listed tools never fold (use with care).</td></tr>
<tr><td class="mono">protectedLatestTools</td><td class="mech">string[]</td><td data-i18n="ct.plt">Protects only the LATEST instance of cumulative-snapshot tools whose newest result supersedes older ones (e.g. todo lists).</td></tr>
Expand Down
Loading