mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 05:45:51 +00:00
feat: 添加对 langfuse 监控的支持 (#242)
* docs: 更新类型检查的 CLAUDE.md * feat: 添加模型 1M 上下文切换 * chore: remove prefetchOfficialMcpUrls call on startup * docs: 添加 git commit 规范 * feat: 第一次接入 langfuse * fix: 修复 generation 的计时的错误 * feat: 添加多 agent 的监控 * feat: 添加 /poor 省流模式,toggle 关闭 extract_memories 和 prompt_suggestion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: 修复 lock 文件 * chore: 更新类型依赖 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -133,15 +133,23 @@ export async function* handleStopHooks(
|
||||
// --bare / SIMPLE: skip background bookkeeping (prompt suggestion,
|
||||
// memory extraction, auto-dream). Scripted -p calls don't want auto-memory
|
||||
// or forked agents contending for resources during shutdown.
|
||||
// Poor mode: also skip prompt suggestion and memory extraction.
|
||||
const poorMode = feature('POOR')
|
||||
? (await import('../commands/poor/poorMode.js')).isPoorModeActive()
|
||||
: false
|
||||
if (!isBareMode()) {
|
||||
// Inline env check for dead code elimination in external builds
|
||||
if (!isEnvDefinedFalsy(process.env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION)) {
|
||||
if (
|
||||
!isEnvDefinedFalsy(process.env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION) &&
|
||||
!poorMode
|
||||
) {
|
||||
void executePromptSuggestion(stopHookContext)
|
||||
}
|
||||
if (
|
||||
feature('EXTRACT_MEMORIES') &&
|
||||
!toolUseContext.agentId &&
|
||||
isExtractModeActive()
|
||||
isExtractModeActive() &&
|
||||
!poorMode
|
||||
) {
|
||||
// Fire-and-forget in both interactive and non-interactive. For -p/SDK,
|
||||
// print.ts drains the in-flight promise after flushing the response
|
||||
|
||||
Reference in New Issue
Block a user