refactor(agent): Pi 会话运行时 - 接入原生 Agent 与 Skills 工具链
This commit is contained in:
1 parent
f9b8c5a43e
commit
387d3562ad
69 files changed
+11460
-207
No files matched your search
@@ -50,12 +50,14 @@ func cloudAgentContextBudgetFor(contextWindow, maxOutput int, source string) clo
|
||||
if inputBudget < 1_024 {
|
||||
inputBudget = max(1_024, contextWindow/2)
|
||||
}
|
||||
compactAt := min(contextWindow*80/100, inputBudget)
|
||||
compactAt = max(1_024, compactAt)
|
||||
return cloudAgentContextBudget{
|
||||
ContextWindowTokens: contextWindow,
|
||||
MaxOutputTokens: maxOutput,
|
||||
OverheadTokens: overhead,
|
||||
InputBudgetTokens: inputBudget,
|
||||
CompactAtTokens: max(1_024, inputBudget*85/100),
|
||||
CompactAtTokens: compactAt,
|
||||
Source: source,
|
||||
Configured: configured,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user