mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
fix(test): add missing metrics and model fields to Footer test mock
useStatusLine hook accesses sessionStats.metrics.tools.totalCalls, sessionStats.metrics.files.totalLinesAdded, and currentModel which were missing from the mock UIState, causing a TypeError crash during render and making 4 Footer tests fail in CI.
This commit is contained in:
parent
24a28d5fb0
commit
c36953816c
1 changed files with 15 additions and 0 deletions
|
|
@ -34,7 +34,22 @@ const createMockUIState = (overrides: Partial<UIState> = {}): UIState =>
|
|||
({
|
||||
sessionStats: {
|
||||
lastPromptTokenCount: 100,
|
||||
sessionId: 'test-session',
|
||||
metrics: {
|
||||
models: {},
|
||||
tools: {
|
||||
totalCalls: 0,
|
||||
totalSuccess: 0,
|
||||
totalFail: 0,
|
||||
totalDurationMs: 0,
|
||||
totalDecisions: { accept: 0, reject: 0, modify: 0, auto_accept: 0 },
|
||||
byName: {},
|
||||
},
|
||||
files: { totalLinesAdded: 0, totalLinesRemoved: 0 },
|
||||
},
|
||||
},
|
||||
currentModel: 'gemini-pro',
|
||||
branchName: undefined,
|
||||
geminiMdFileCount: 0,
|
||||
contextFileNames: [],
|
||||
showToolDescriptions: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue