mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
fix: 修复 anthropic 煞笔的四个 bug (#352)
* fix: 移除文件编辑前必须先读取的限制 移除 FileEditTool 和 FileWriteTool 中的 "read before edit" 校验, 允许直接编辑未读取过的文件。保留文件修改过期检测。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs: 更新 teach-me 自动写 note 笔记的功能 * fix: 修复 DeepSeek V4 reasoning_content 回传导致的 400 错误 - 扩大模型名称检测范围,匹配所有 deepseek 模型(V4、R1 等) - 始终保留 thinking blocks 为 reasoning_content 回传给 API - 移除有 bug 的 turn boundary 剥离逻辑 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: Opus 4.6/4.7 默认推理 effort 从 medium 改为 high Pro 和 Max/Team 订阅者的 Opus 默认 effort 之前被降级为 medium, 导致用户感知模型「变笨」。恢复为 high。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: 移除 thinkingClearLatched sticky-on 机制 空闲超过 1 小时后 thinkingClearLatched 会被触发且永不重置, 导致每轮 API 调用都清除 thinking 历史。完整移除该 latch 机制, clearAllThinking 硬编码为 false。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: 移除 numeric_length_anchors 系统指令 删除「工具调用间文字 ≤25 词、最终回复 ≤100 词」的硬性限制。 ablation 测试显示该约束使整体智能下降 3%。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: 修复测试中 reasoning_content 类型断言 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -235,11 +235,6 @@ type State = {
|
||||
// microcompact is first enabled, keep sending the header so mid-session
|
||||
// GrowthBook/settings toggles don't bust the prompt cache.
|
||||
cacheEditingHeaderLatched: boolean | null
|
||||
// Sticky-on latch for clearing thinking from prior tool loops. Triggered
|
||||
// when >1h since last API call (confirmed cache miss — no cache-hit
|
||||
// benefit to keeping thinking). Once latched, stays on so the newly-warmed
|
||||
// thinking-cleared cache isn't busted by flipping back to keep:'all'.
|
||||
thinkingClearLatched: boolean | null
|
||||
// Current prompt ID (UUID) correlating a user prompt with subsequent OTel events
|
||||
promptId: string | null
|
||||
// Last API requestId for the main conversation chain (not subagents).
|
||||
@@ -414,7 +409,6 @@ function getInitialState(): State {
|
||||
afkModeHeaderLatched: null,
|
||||
fastModeHeaderLatched: null,
|
||||
cacheEditingHeaderLatched: null,
|
||||
thinkingClearLatched: null,
|
||||
// Current prompt ID
|
||||
promptId: null,
|
||||
lastMainRequestId: undefined,
|
||||
@@ -1729,14 +1723,6 @@ export function setCacheEditingHeaderLatched(v: boolean): void {
|
||||
STATE.cacheEditingHeaderLatched = v
|
||||
}
|
||||
|
||||
export function getThinkingClearLatched(): boolean | null {
|
||||
return STATE.thinkingClearLatched
|
||||
}
|
||||
|
||||
export function setThinkingClearLatched(v: boolean): void {
|
||||
STATE.thinkingClearLatched = v
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset beta header latches to null. Called on /clear and /compact so a
|
||||
* fresh conversation gets fresh header evaluation.
|
||||
@@ -1745,7 +1731,6 @@ export function clearBetaHeaderLatches(): void {
|
||||
STATE.afkModeHeaderLatched = null
|
||||
STATE.fastModeHeaderLatched = null
|
||||
STATE.cacheEditingHeaderLatched = null
|
||||
STATE.thinkingClearLatched = null
|
||||
}
|
||||
|
||||
export function getPromptId(): string | null {
|
||||
|
||||
Reference in New Issue
Block a user