cc-viewer 1.9.13 → 1.9.14
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/assets/{App-BzOM1_y-.js → App-BzV1ieDH.js} +2 -2
- package/dist/assets/{MdxEditorPanel-Db1nmcJV.js → MdxEditorPanel-DI3B4gsM.js} +1 -1
- package/dist/assets/{Mobile-rjfABa-U.js → Mobile-qBkAnXy3.js} +1 -1
- package/dist/assets/{ProxyStatsModal-Ch1BH0Kp.js → ProxyStatsModal-B8K0AtAq.js} +1 -1
- package/dist/assets/{index-CAiC6cw-.js → index-CU0gt6m1.js} +2 -2
- package/dist/assets/seqResourceLoaders-nGCs11zu.js +2 -0
- package/dist/index.html +1 -1
- package/node_modules/@ccv/core/src/context-rules.js +6 -2
- package/package.json +1 -1
- package/server/lib/model-system-prompts.js +4 -1
- package/server/system-prompt-templates/presets/kimi-k3.md +4 -0
- package/dist/assets/seqResourceLoaders-Ds8-_QA3.js +0 -2
package/dist/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
// 整体显示大小已弃用 CSS zoom:Electron 改用 webFrame.setZoomFactor(首屏抢占见
|
|
22
22
|
// electron/tab-content-preload.js),纯浏览器交由用户用浏览器自带快捷键缩放,故此处不再设 zoom。
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index-
|
|
24
|
+
<script type="module" crossorigin src="./assets/index-CU0gt6m1.js"></script>
|
|
25
25
|
<link rel="modulepreload" crossorigin href="./assets/vendor-antd-I6I2F7Rv.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/vendor-codemirror-Zkm6UHQg.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="./assets/vendor-mdxeditor-CC09MDyZ.js">
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
// 显式 opt-in 优先级最高,胜过一切家族规则。
|
|
15
15
|
const SIZE_SUFFIX_RE = /\[(\d+)([km])\]/i;
|
|
16
16
|
|
|
17
|
+
// Bare K3/K4 aliases accept version, routing, and context-size suffixes without
|
|
18
|
+
// treating lookalike names such as k30 or k3pro as Kimi models.
|
|
19
|
+
const KIMI_MODEL_RE = /kimi|moonshot|^k[34](?:$|[.[\]-])/i;
|
|
20
|
+
|
|
17
21
|
/**
|
|
18
22
|
* 解析模型名里的 [Nk]/[Nm] 窗口后缀。
|
|
19
23
|
* @param {string} modelName
|
|
@@ -74,7 +78,7 @@ const MODEL_CONTEXT_SIZES = [
|
|
|
74
78
|
// Kimi 家族精确档:k2.x/k3 等带 kimi/moonshot 前缀的 → 256K;裸 'k3'(无前缀,
|
|
75
79
|
// 代理直连时的简写 model 名)→ 256K 精确档但 classifyContextWindow 不升 1M
|
|
76
80
|
// (见该函数的家族特判,裸 k3 归 200K 桶,超量由 adaptContextWindow 纠偏)。
|
|
77
|
-
{ match:
|
|
81
|
+
{ match: KIMI_MODEL_RE, tokens: 256000 },
|
|
78
82
|
// deepseek-v4 defaults to 1M; placed before generic /deepseek/ so the
|
|
79
83
|
// first-match-wins loop picks it up before falling through to 128K.
|
|
80
84
|
// The `deepseek-flash` shorthand (an alias of deepseek-v4-flash, see the prompt
|
|
@@ -120,7 +124,7 @@ export function getModelMaxTokens(modelName) {
|
|
|
120
124
|
export function classifyContextWindow(modelName) {
|
|
121
125
|
if (!modelName || typeof modelName !== 'string') return 200000;
|
|
122
126
|
if (modelName.toLowerCase().includes('1m')) return 1000000;
|
|
123
|
-
if (
|
|
127
|
+
if (KIMI_MODEL_RE.test(modelName)) return 1000000;
|
|
124
128
|
// deepseek-flash 简写(deepseek-v4-flash 的别名)归 1M 桶,与请求侧判定对齐。
|
|
125
129
|
if (/^deepseek-flash/i.test(modelName)) return 1000000;
|
|
126
130
|
return getModelMaxTokens(modelName) >= 1000000 ? 1000000 : 200000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-viewer",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.14",
|
|
4
4
|
"description": "Claude Code logging, visualization, and management toolkit — launch a web viewer alongside Claude Code with full request/response tracing, proxy, and mobile support",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "server.js",
|
|
@@ -263,7 +263,10 @@ const MODEL_ID_ALIASES = {
|
|
|
263
263
|
// 让 .some 调用炸掉(模型 id 来自外部输入,不能信任)。
|
|
264
264
|
// Expand a model id into every equivalent lowercase spelling.
|
|
265
265
|
function modelIdVariants(id) {
|
|
266
|
-
|
|
266
|
+
// A version/routing suffix identifies the same K3 family, not an unrelated
|
|
267
|
+
// model. Keep the boundary so k30 and k3pro remain unmatched.
|
|
268
|
+
const aliasId = /^k3(?:[.-]|$)/.test(id) ? 'k3' : id;
|
|
269
|
+
return Object.hasOwn(MODEL_ID_ALIASES, aliasId) ? MODEL_ID_ALIASES[aliasId] : [id];
|
|
267
270
|
}
|
|
268
271
|
|
|
269
272
|
// 供内置预设匹配复用的导出包装:入参任意大小写,先剥 `[1m]` 类方括号后缀
|
|
@@ -10,6 +10,10 @@ You are ${model.name}, an interactive coding agent that helps users with softwar
|
|
|
10
10
|
|
|
11
11
|
IMPORTANT: Never generate or guess URLs unless you are confident they help the user with programming. Prefer URLs the user provides or ones found in local files.
|
|
12
12
|
|
|
13
|
+
# Choosing skills
|
|
14
|
+
- At the skill-selection entry point, skip `claude-api` and the skill whose display title is "Building LLM-Powered Applications with Claude": they are the same Anthropic-only API skill, so treat the identifier and title as aliases. Do not invoke it or read its documentation unless the task explicitly requires Claude/Anthropic SDK or API integration. This applies even when Claude Code automatically recommends or triggers it.
|
|
15
|
+
- Working on model-name recognition, model logos, aliases, or context-window classification in an existing project is local application code, NOT LLM API integration. Do not load `claude-api` for these tasks merely because the code mentions models, Claude, or model IDs. Locate the local matcher and its tests first; for a genuinely unrelated skill, do not load it just to determine that it is unrelated.
|
|
16
|
+
|
|
13
17
|
# Doing tasks
|
|
14
18
|
- Read the relevant files before acting or answering; ground every claim and change in code you have actually looked at.
|
|
15
19
|
- Before your first tool call, output a one-sentence action plan; then act.
|