@google/gemini-cli 0.1.7 → 0.1.8-rc.1
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/README.md +8 -2
- package/dist/google-gemini-cli-0.1.8-rc.1.tgz +0 -0
- package/dist/package.json +15 -11
- package/dist/src/config/auth.js +1 -1
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.js +1 -1
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/settings.d.ts +1 -0
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +2 -2
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/nonInteractiveCli.js +4 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/ui/App.js +4 -25
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/App.test.js +19 -0
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.d.ts +3 -3
- package/dist/src/ui/components/AuthDialog.js +3 -6
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.test.js +3 -3
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +0 -2
- package/dist/src/ui/components/Footer.js +2 -2
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Help.js +3 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +3 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +19 -25
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js +217 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -2
- package/dist/src/ui/components/SessionSummaryDisplay.js +3 -19
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +46 -27
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -3
- package/dist/src/ui/components/StatsDisplay.js +34 -20
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +261 -37
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.js +160 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.js +1 -1
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +5 -4
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +17 -19
- package/dist/src/ui/contexts/SessionContext.js +20 -103
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.test.js +66 -121
- package/dist/src/ui/contexts/SessionContext.test.js.map +1 -1
- package/dist/src/ui/editors/editorSettingsManager.js +4 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +36 -18
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.d.ts +2 -3
- package/dist/src/ui/hooks/useAuthCommand.js +7 -13
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +3 -2
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +64 -92
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +86 -134
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +2 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +7 -2
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.js +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +302 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.js +2 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/types.d.ts +17 -8
- package/dist/src/ui/types.js +2 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +55 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +176 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +66 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +55 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +17 -0
- package/dist/src/ui/utils/displayUtils.js +24 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/errorParsing.js +1 -1
- package/dist/src/ui/utils/errorParsing.js.map +1 -1
- package/dist/src/ui/utils/formatters.js +1 -1
- package/dist/src/ui/utils/formatters.js.map +1 -1
- package/dist/src/ui/utils/textUtils.js +2 -2
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/updateCheck.js +3 -1
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -11
- package/dist/google-gemini-cli-0.1.7.tgz +0 -0
- package/dist/src/ui/components/Stats.d.ts +0 -39
- package/dist/src/ui/components/Stats.js +0 -23
- package/dist/src/ui/components/Stats.js.map +0 -1
- package/dist/src/ui/components/Stats.test.js +0 -57
- package/dist/src/ui/components/Stats.test.js.map +0 -1
- /package/dist/src/ui/components/{Stats.test.d.ts → ModelStatsDisplay.test.d.ts} +0 -0
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Colors } from '../colors.js';
|
|
5
|
-
import { formatDuration } from '../utils/formatters.js';
|
|
6
|
-
import { StatRow, StatsColumn } from './Stats.js';
|
|
7
|
-
// --- Main Component ---
|
|
8
|
-
export const SessionSummaryDisplay = ({ stats, duration, }) => {
|
|
9
|
-
const cumulativeFormatted = {
|
|
10
|
-
inputTokens: stats.promptTokenCount,
|
|
11
|
-
outputTokens: stats.candidatesTokenCount,
|
|
12
|
-
toolUseTokens: stats.toolUsePromptTokenCount,
|
|
13
|
-
thoughtsTokens: stats.thoughtsTokenCount,
|
|
14
|
-
cachedTokens: stats.cachedContentTokenCount,
|
|
15
|
-
totalTokens: stats.totalTokenCount,
|
|
16
|
-
};
|
|
17
|
-
const title = 'Agent powering down. Goodbye!';
|
|
18
|
-
return (_jsxs(Box, { borderStyle: "round", borderColor: "gray", flexDirection: "column", paddingY: 1, paddingX: 2, alignSelf: "flex-start", children: [_jsx(Box, { marginBottom: 1, flexDirection: "column", children: Colors.GradientColors ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsx(Text, { bold: true, children: title }) })) : (_jsx(Text, { bold: true, children: title })) }), _jsx(Box, { marginTop: 1, children: _jsx(StatsColumn, { title: `Cumulative Stats (${stats.turnCount} Turns)`, stats: cumulativeFormatted, isCumulative: true, children: _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(StatRow, { label: "Total duration (API)", value: formatDuration(stats.apiTimeMs) }), _jsx(StatRow, { label: "Total duration (wall)", value: duration })] }) }) })] }));
|
|
19
|
-
};
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StatsDisplay } from './StatsDisplay.js';
|
|
3
|
+
export const SessionSummaryDisplay = ({ duration, }) => (_jsx(StatsDisplay, { title: "Agent powering down. Goodbye!", duration: duration }));
|
|
20
4
|
//# sourceMappingURL=SessionSummaryDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSummaryDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SessionSummaryDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,KAAC,YAAY,IAAC,KAAK,EAAC,+BAA+B,EAAC,QAAQ,EAAE,QAAQ,GAAI,CAC3E,CAAC"}
|
|
@@ -5,37 +5,56 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { render } from 'ink-testing-library';
|
|
8
|
-
import { describe, it, expect } from 'vitest';
|
|
8
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
9
9
|
import { SessionSummaryDisplay } from './SessionSummaryDisplay.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
cachedContentTokenCount: 500,
|
|
17
|
-
toolUsePromptTokenCount: 200,
|
|
18
|
-
thoughtsTokenCount: 300,
|
|
19
|
-
apiTimeMs: 50234,
|
|
10
|
+
import * as SessionContext from '../contexts/SessionContext.js';
|
|
11
|
+
vi.mock('../contexts/SessionContext.js', async (importOriginal) => {
|
|
12
|
+
const actual = await importOriginal();
|
|
13
|
+
return {
|
|
14
|
+
...actual,
|
|
15
|
+
useSessionStats: vi.fn(),
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
});
|
|
18
|
+
const useSessionStatsMock = vi.mocked(SessionContext.useSessionStats);
|
|
19
|
+
const renderWithMockedStats = (metrics) => {
|
|
20
|
+
useSessionStatsMock.mockReturnValue({
|
|
21
|
+
stats: {
|
|
22
|
+
sessionStartTime: new Date(),
|
|
23
|
+
metrics,
|
|
24
|
+
lastPromptTokenCount: 0,
|
|
25
|
+
},
|
|
25
26
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
return render(_jsx(SessionSummaryDisplay, { duration: "1h 23m 45s" }));
|
|
28
|
+
};
|
|
29
|
+
describe('<SessionSummaryDisplay />', () => {
|
|
30
|
+
it('renders the summary display with a title', () => {
|
|
31
|
+
const metrics = {
|
|
32
|
+
models: {
|
|
33
|
+
'gemini-2.5-pro': {
|
|
34
|
+
api: { totalRequests: 10, totalErrors: 1, totalLatencyMs: 50234 },
|
|
35
|
+
tokens: {
|
|
36
|
+
prompt: 1000,
|
|
37
|
+
candidates: 2000,
|
|
38
|
+
total: 3500,
|
|
39
|
+
cached: 500,
|
|
40
|
+
thoughts: 300,
|
|
41
|
+
tool: 200,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
tools: {
|
|
46
|
+
totalCalls: 0,
|
|
47
|
+
totalSuccess: 0,
|
|
48
|
+
totalFail: 0,
|
|
49
|
+
totalDurationMs: 0,
|
|
50
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
51
|
+
byName: {},
|
|
52
|
+
},
|
|
36
53
|
};
|
|
37
|
-
const { lastFrame } =
|
|
38
|
-
|
|
54
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
55
|
+
const output = lastFrame();
|
|
56
|
+
expect(output).toContain('Agent powering down. Goodbye!');
|
|
57
|
+
expect(output).toMatchSnapshot();
|
|
39
58
|
});
|
|
40
59
|
});
|
|
41
60
|
//# sourceMappingURL=SessionSummaryDisplay.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSummaryDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionSummaryDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;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aACF;YACD,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,CAAC;gBAClB,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;gBACnD,MAAM,EAAE,EAAE;aACX;SACF,CAAC;QAEF,MAAM,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC;QAC1D,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { CumulativeStats } from '../contexts/SessionContext.js';
|
|
8
7
|
interface StatsDisplayProps {
|
|
9
|
-
stats: CumulativeStats;
|
|
10
|
-
lastTurnStats: CumulativeStats;
|
|
11
8
|
duration: string;
|
|
9
|
+
title?: string;
|
|
12
10
|
}
|
|
13
11
|
export declare const StatsDisplay: React.FC<StatsDisplayProps>;
|
|
14
12
|
export {};
|
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
|
+
import Gradient from 'ink-gradient';
|
|
3
4
|
import { Colors } from '../colors.js';
|
|
4
5
|
import { formatDuration } from '../utils/formatters.js';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
import { useSessionStats } from '../contexts/SessionContext.js';
|
|
7
|
+
import { getStatusColor, TOOL_SUCCESS_RATE_HIGH, TOOL_SUCCESS_RATE_MEDIUM, USER_AGREEMENT_RATE_HIGH, USER_AGREEMENT_RATE_MEDIUM, } from '../utils/displayUtils.js';
|
|
8
|
+
import { computeSessionStats } from '../utils/computeStats.js';
|
|
9
|
+
const StatRow = ({ title, children }) => (_jsxs(Box, { children: [_jsx(Box, { width: 28, children: _jsx(Text, { color: Colors.LightBlue, children: title }) }), children] }));
|
|
10
|
+
const SubStatRow = ({ title, children }) => (_jsxs(Box, { paddingLeft: 2, children: [_jsx(Box, { width: 26, children: _jsxs(Text, { children: ["\u00BB ", title] }) }), children] }));
|
|
11
|
+
const Section = ({ title, children }) => (_jsxs(Box, { flexDirection: "column", width: "100%", marginBottom: 1, children: [_jsx(Text, { bold: true, children: title }), children] }));
|
|
12
|
+
const ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
|
|
13
|
+
const nameWidth = 25;
|
|
14
|
+
const requestsWidth = 8;
|
|
15
|
+
const inputTokensWidth = 15;
|
|
16
|
+
const outputTokensWidth = 15;
|
|
17
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { children: [_jsx(Box, { width: nameWidth, children: _jsx(Text, { bold: true, children: "Model Usage" }) }), _jsx(Box, { width: requestsWidth, justifyContent: "flex-end", children: _jsx(Text, { bold: true, children: "Reqs" }) }), _jsx(Box, { width: inputTokensWidth, justifyContent: "flex-end", children: _jsx(Text, { bold: true, children: "Input Tokens" }) }), _jsx(Box, { width: outputTokensWidth, justifyContent: "flex-end", children: _jsx(Text, { bold: true, children: "Output Tokens" }) })] }), _jsx(Box, { borderStyle: "round", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, width: nameWidth + requestsWidth + inputTokensWidth + outputTokensWidth }), Object.entries(models).map(([name, modelMetrics]) => (_jsxs(Box, { children: [_jsx(Box, { width: nameWidth, children: _jsx(Text, { children: name.replace('-001', '') }) }), _jsx(Box, { width: requestsWidth, justifyContent: "flex-end", children: _jsx(Text, { children: modelMetrics.api.totalRequests }) }), _jsx(Box, { width: inputTokensWidth, justifyContent: "flex-end", children: _jsx(Text, { color: Colors.AccentYellow, children: modelMetrics.tokens.prompt.toLocaleString() }) }), _jsx(Box, { width: outputTokensWidth, justifyContent: "flex-end", children: _jsx(Text, { color: Colors.AccentYellow, children: modelMetrics.tokens.candidates.toLocaleString() }) })] }, name))), cacheEfficiency > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentGreen, children: "Savings Highlight:" }), ' ', totalCachedTokens.toLocaleString(), " (", cacheEfficiency.toFixed(1), "%) of input tokens were served from the cache, reducing costs."] }), _jsx(Box, { height: 1 }), _jsx(Text, { color: Colors.Gray, children: "\u00BB Tip: For a full token breakdown, run `/stats model`." })] }))] }));
|
|
18
|
+
};
|
|
19
|
+
export const StatsDisplay = ({ duration, title, }) => {
|
|
20
|
+
const { stats } = useSessionStats();
|
|
21
|
+
const { metrics } = stats;
|
|
22
|
+
const { models, tools } = metrics;
|
|
23
|
+
const computed = computeSessionStats(metrics);
|
|
24
|
+
const successThresholds = {
|
|
25
|
+
green: TOOL_SUCCESS_RATE_HIGH,
|
|
26
|
+
yellow: TOOL_SUCCESS_RATE_MEDIUM,
|
|
27
|
+
};
|
|
28
|
+
const agreementThresholds = {
|
|
29
|
+
green: USER_AGREEMENT_RATE_HIGH,
|
|
30
|
+
yellow: USER_AGREEMENT_RATE_MEDIUM,
|
|
17
31
|
};
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
const successColor = getStatusColor(computed.successRate, successThresholds);
|
|
33
|
+
const agreementColor = getStatusColor(computed.agreementRate, agreementThresholds);
|
|
34
|
+
const renderTitle = () => {
|
|
35
|
+
if (title) {
|
|
36
|
+
return Colors.GradientColors && Colors.GradientColors.length > 0 ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsx(Text, { bold: true, children: title }) })) : (_jsx(Text, { bold: true, color: Colors.AccentPurple, children: title }));
|
|
37
|
+
}
|
|
38
|
+
return (_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Session Stats" }));
|
|
25
39
|
};
|
|
26
|
-
return (_jsxs(Box, { borderStyle: "round", borderColor:
|
|
40
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "column", paddingY: 1, paddingX: 2, children: [renderTitle(), _jsx(Box, { height: 1 }), tools.totalCalls > 0 && (_jsxs(Section, { title: "Interaction Summary", children: [_jsx(StatRow, { title: "Tool Calls:", children: _jsxs(Text, { children: [tools.totalCalls, " (", ' ', _jsxs(Text, { color: Colors.AccentGreen, children: ["\u2714 ", tools.totalSuccess] }), ' ', _jsxs(Text, { color: Colors.AccentRed, children: ["\u2716 ", tools.totalFail] }), " )"] }) }), _jsx(StatRow, { title: "Success Rate:", children: _jsxs(Text, { color: successColor, children: [computed.successRate.toFixed(1), "%"] }) }), computed.totalDecisions > 0 && (_jsx(StatRow, { title: "User Agreement:", children: _jsxs(Text, { color: agreementColor, children: [computed.agreementRate.toFixed(1), "%", ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", computed.totalDecisions, " reviewed)"] })] }) }))] })), _jsxs(Section, { title: "Performance", children: [_jsx(StatRow, { title: "Wall Time:", children: _jsx(Text, { children: duration }) }), _jsx(StatRow, { title: "Agent Active:", children: _jsx(Text, { children: formatDuration(computed.agentActiveTime) }) }), _jsx(SubStatRow, { title: "API Time:", children: _jsxs(Text, { children: [formatDuration(computed.totalApiTime), ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", computed.apiTimePercent.toFixed(1), "%)"] })] }) }), _jsx(SubStatRow, { title: "Tool Time:", children: _jsxs(Text, { children: [formatDuration(computed.totalToolTime), ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", computed.toolTimePercent.toFixed(1), "%)"] })] }) })] }), Object.keys(models).length > 0 && (_jsx(ModelUsageTable, { models: models, totalCachedTokens: computed.totalCachedTokens, cacheEfficiency: computed.cacheEfficiency }))] }));
|
|
27
41
|
};
|
|
28
42
|
//# sourceMappingURL=StatsDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatsDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/StatsDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"StatsDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/StatsDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,QAAQ,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAgB,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAQ/D,MAAM,OAAO,GAA2B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC/D,MAAC,GAAG,eAEF,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,YACZ,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,KAAK,GAAQ,GACzC,EACL,QAAQ,IACL,CACP,CAA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AED,MAAC,OAAO,IAAC,KAAK,EAAC,aAAa,aAC1B,KAAC,OAAO,IAAC,KAAK,EAAC,YAAY,YACzB,KAAC,IAAI,cAAE,QAAQ,GAAQ,GACf,EACV,KAAC,OAAO,IAAC,KAAK,EAAC,eAAe,YAC5B,KAAC,IAAI,cAAE,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAQ,GAC/C,EACV,KAAC,UAAU,IAAC,KAAK,EAAC,WAAW,YAC3B,MAAC,IAAI,eACF,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,EAC3C,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,kBACpB,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,UAC/B,IACF,GACI,EACb,KAAC,UAAU,IAAC,KAAK,EAAC,YAAY,YAC5B,MAAC,IAAI,eACF,cAAc,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,GAAG,EAC5C,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,kBACpB,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,UAChC,IACF,GACI,IACL,EAET,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CACjC,KAAC,eAAe,IACd,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB,EAC7C,eAAe,EAAE,QAAQ,CAAC,eAAe,GACzC,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -5,47 +5,271 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { render } from 'ink-testing-library';
|
|
8
|
-
import { describe, it, expect } from 'vitest';
|
|
8
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
9
9
|
import { StatsDisplay } from './StatsDisplay.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
toolUsePromptTokenCount: 200,
|
|
18
|
-
thoughtsTokenCount: 300,
|
|
19
|
-
apiTimeMs: 50234,
|
|
20
|
-
};
|
|
21
|
-
const mockLastTurnStats = {
|
|
22
|
-
turnCount: 1,
|
|
23
|
-
promptTokenCount: 100,
|
|
24
|
-
candidatesTokenCount: 200,
|
|
25
|
-
totalTokenCount: 350,
|
|
26
|
-
cachedContentTokenCount: 50,
|
|
27
|
-
toolUsePromptTokenCount: 20,
|
|
28
|
-
thoughtsTokenCount: 30,
|
|
29
|
-
apiTimeMs: 1234,
|
|
10
|
+
import * as SessionContext from '../contexts/SessionContext.js';
|
|
11
|
+
// Mock the context to provide controlled data for testing
|
|
12
|
+
vi.mock('../contexts/SessionContext.js', async (importOriginal) => {
|
|
13
|
+
const actual = await importOriginal();
|
|
14
|
+
return {
|
|
15
|
+
...actual,
|
|
16
|
+
useSessionStats: vi.fn(),
|
|
30
17
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
});
|
|
19
|
+
const useSessionStatsMock = vi.mocked(SessionContext.useSessionStats);
|
|
20
|
+
const renderWithMockedStats = (metrics) => {
|
|
21
|
+
useSessionStatsMock.mockReturnValue({
|
|
22
|
+
stats: {
|
|
23
|
+
sessionStartTime: new Date(),
|
|
24
|
+
metrics,
|
|
25
|
+
lastPromptTokenCount: 0,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
return render(_jsx(StatsDisplay, { duration: "1s" }));
|
|
29
|
+
};
|
|
30
|
+
describe('<StatsDisplay />', () => {
|
|
31
|
+
it('renders only the Performance section in its zero state', () => {
|
|
32
|
+
const zeroMetrics = {
|
|
33
|
+
models: {},
|
|
34
|
+
tools: {
|
|
35
|
+
totalCalls: 0,
|
|
36
|
+
totalSuccess: 0,
|
|
37
|
+
totalFail: 0,
|
|
38
|
+
totalDurationMs: 0,
|
|
39
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
40
|
+
byName: {},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const { lastFrame } = renderWithMockedStats(zeroMetrics);
|
|
44
|
+
const output = lastFrame();
|
|
45
|
+
expect(output).toContain('Performance');
|
|
46
|
+
expect(output).not.toContain('Interaction Summary');
|
|
47
|
+
expect(output).not.toContain('Efficiency & Optimizations');
|
|
48
|
+
expect(output).not.toContain('Model'); // The table header
|
|
49
|
+
expect(output).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
it('renders a table with two models correctly', () => {
|
|
52
|
+
const metrics = {
|
|
53
|
+
models: {
|
|
54
|
+
'gemini-2.5-pro': {
|
|
55
|
+
api: { totalRequests: 3, totalErrors: 0, totalLatencyMs: 15000 },
|
|
56
|
+
tokens: {
|
|
57
|
+
prompt: 1000,
|
|
58
|
+
candidates: 2000,
|
|
59
|
+
total: 43234,
|
|
60
|
+
cached: 500,
|
|
61
|
+
thoughts: 100,
|
|
62
|
+
tool: 50,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
'gemini-2.5-flash': {
|
|
66
|
+
api: { totalRequests: 5, totalErrors: 1, totalLatencyMs: 4500 },
|
|
67
|
+
tokens: {
|
|
68
|
+
prompt: 25000,
|
|
69
|
+
candidates: 15000,
|
|
70
|
+
total: 150000000,
|
|
71
|
+
cached: 10000,
|
|
72
|
+
thoughts: 2000,
|
|
73
|
+
tool: 1000,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
tools: {
|
|
78
|
+
totalCalls: 0,
|
|
79
|
+
totalSuccess: 0,
|
|
80
|
+
totalFail: 0,
|
|
81
|
+
totalDurationMs: 0,
|
|
82
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
83
|
+
byName: {},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
87
|
+
const output = lastFrame();
|
|
88
|
+
expect(output).toContain('gemini-2.5-pro');
|
|
89
|
+
expect(output).toContain('gemini-2.5-flash');
|
|
90
|
+
expect(output).toContain('1,000');
|
|
91
|
+
expect(output).toContain('25,000');
|
|
92
|
+
expect(output).toMatchSnapshot();
|
|
93
|
+
});
|
|
94
|
+
it('renders all sections when all data is present', () => {
|
|
95
|
+
const metrics = {
|
|
96
|
+
models: {
|
|
97
|
+
'gemini-2.5-pro': {
|
|
98
|
+
api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
|
|
99
|
+
tokens: {
|
|
100
|
+
prompt: 100,
|
|
101
|
+
candidates: 100,
|
|
102
|
+
total: 250,
|
|
103
|
+
cached: 50,
|
|
104
|
+
thoughts: 0,
|
|
105
|
+
tool: 0,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
tools: {
|
|
110
|
+
totalCalls: 2,
|
|
111
|
+
totalSuccess: 1,
|
|
112
|
+
totalFail: 1,
|
|
113
|
+
totalDurationMs: 123,
|
|
114
|
+
totalDecisions: { accept: 1, reject: 0, modify: 0 },
|
|
115
|
+
byName: {
|
|
116
|
+
'test-tool': {
|
|
117
|
+
count: 2,
|
|
118
|
+
success: 1,
|
|
119
|
+
fail: 1,
|
|
120
|
+
durationMs: 123,
|
|
121
|
+
decisions: { accept: 1, reject: 0, modify: 0 },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
127
|
+
const output = lastFrame();
|
|
128
|
+
expect(output).toContain('Performance');
|
|
129
|
+
expect(output).toContain('Interaction Summary');
|
|
130
|
+
expect(output).toContain('User Agreement');
|
|
131
|
+
expect(output).toContain('Savings Highlight');
|
|
132
|
+
expect(output).toContain('gemini-2.5-pro');
|
|
133
|
+
expect(output).toMatchSnapshot();
|
|
134
|
+
});
|
|
135
|
+
describe('Conditional Rendering Tests', () => {
|
|
136
|
+
it('hides User Agreement when no decisions are made', () => {
|
|
137
|
+
const metrics = {
|
|
138
|
+
models: {},
|
|
139
|
+
tools: {
|
|
140
|
+
totalCalls: 2,
|
|
141
|
+
totalSuccess: 1,
|
|
142
|
+
totalFail: 1,
|
|
143
|
+
totalDurationMs: 123,
|
|
144
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 }, // No decisions
|
|
145
|
+
byName: {
|
|
146
|
+
'test-tool': {
|
|
147
|
+
count: 2,
|
|
148
|
+
success: 1,
|
|
149
|
+
fail: 1,
|
|
150
|
+
durationMs: 123,
|
|
151
|
+
decisions: { accept: 0, reject: 0, modify: 0 },
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
157
|
+
const output = lastFrame();
|
|
158
|
+
expect(output).toContain('Interaction Summary');
|
|
159
|
+
expect(output).toContain('Success Rate');
|
|
160
|
+
expect(output).not.toContain('User Agreement');
|
|
161
|
+
expect(output).toMatchSnapshot();
|
|
162
|
+
});
|
|
163
|
+
it('hides Efficiency section when cache is not used', () => {
|
|
164
|
+
const metrics = {
|
|
165
|
+
models: {
|
|
166
|
+
'gemini-2.5-pro': {
|
|
167
|
+
api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
|
|
168
|
+
tokens: {
|
|
169
|
+
prompt: 100,
|
|
170
|
+
candidates: 100,
|
|
171
|
+
total: 200,
|
|
172
|
+
cached: 0,
|
|
173
|
+
thoughts: 0,
|
|
174
|
+
tool: 0,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
tools: {
|
|
179
|
+
totalCalls: 0,
|
|
180
|
+
totalSuccess: 0,
|
|
181
|
+
totalFail: 0,
|
|
182
|
+
totalDurationMs: 0,
|
|
183
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
184
|
+
byName: {},
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
188
|
+
const output = lastFrame();
|
|
189
|
+
expect(output).not.toContain('Efficiency & Optimizations');
|
|
190
|
+
expect(output).toMatchSnapshot();
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
describe('Conditional Color Tests', () => {
|
|
194
|
+
it('renders success rate in green for high values', () => {
|
|
195
|
+
const metrics = {
|
|
196
|
+
models: {},
|
|
197
|
+
tools: {
|
|
198
|
+
totalCalls: 10,
|
|
199
|
+
totalSuccess: 10,
|
|
200
|
+
totalFail: 0,
|
|
201
|
+
totalDurationMs: 0,
|
|
202
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
203
|
+
byName: {},
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
207
|
+
expect(lastFrame()).toMatchSnapshot();
|
|
208
|
+
});
|
|
209
|
+
it('renders success rate in yellow for medium values', () => {
|
|
210
|
+
const metrics = {
|
|
211
|
+
models: {},
|
|
212
|
+
tools: {
|
|
213
|
+
totalCalls: 10,
|
|
214
|
+
totalSuccess: 9,
|
|
215
|
+
totalFail: 1,
|
|
216
|
+
totalDurationMs: 0,
|
|
217
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
218
|
+
byName: {},
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
222
|
+
expect(lastFrame()).toMatchSnapshot();
|
|
223
|
+
});
|
|
224
|
+
it('renders success rate in red for low values', () => {
|
|
225
|
+
const metrics = {
|
|
226
|
+
models: {},
|
|
227
|
+
tools: {
|
|
228
|
+
totalCalls: 10,
|
|
229
|
+
totalSuccess: 5,
|
|
230
|
+
totalFail: 5,
|
|
231
|
+
totalDurationMs: 0,
|
|
232
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
233
|
+
byName: {},
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
const { lastFrame } = renderWithMockedStats(metrics);
|
|
237
|
+
expect(lastFrame()).toMatchSnapshot();
|
|
238
|
+
});
|
|
35
239
|
});
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
240
|
+
describe('Title Rendering', () => {
|
|
241
|
+
const zeroMetrics = {
|
|
242
|
+
models: {},
|
|
243
|
+
tools: {
|
|
244
|
+
totalCalls: 0,
|
|
245
|
+
totalSuccess: 0,
|
|
246
|
+
totalFail: 0,
|
|
247
|
+
totalDurationMs: 0,
|
|
248
|
+
totalDecisions: { accept: 0, reject: 0, modify: 0 },
|
|
249
|
+
byName: {},
|
|
250
|
+
},
|
|
46
251
|
};
|
|
47
|
-
|
|
48
|
-
|
|
252
|
+
it('renders the default title when no title prop is provided', () => {
|
|
253
|
+
const { lastFrame } = renderWithMockedStats(zeroMetrics);
|
|
254
|
+
const output = lastFrame();
|
|
255
|
+
expect(output).toContain('Session Stats');
|
|
256
|
+
expect(output).not.toContain('Agent powering down');
|
|
257
|
+
expect(output).toMatchSnapshot();
|
|
258
|
+
});
|
|
259
|
+
it('renders the custom title when a title prop is provided', () => {
|
|
260
|
+
useSessionStatsMock.mockReturnValue({
|
|
261
|
+
stats: {
|
|
262
|
+
sessionStartTime: new Date(),
|
|
263
|
+
metrics: zeroMetrics,
|
|
264
|
+
lastPromptTokenCount: 0,
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
const { lastFrame } = render(_jsx(StatsDisplay, { duration: "1s", title: "Agent powering down. Goodbye!" }));
|
|
268
|
+
const output = lastFrame();
|
|
269
|
+
expect(output).toContain('Agent powering down. Goodbye!');
|
|
270
|
+
expect(output).not.toContain('Session Stats');
|
|
271
|
+
expect(output).toMatchSnapshot();
|
|
272
|
+
});
|
|
49
273
|
});
|
|
50
274
|
});
|
|
51
275
|
//# sourceMappingURL=StatsDisplay.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatsDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/StatsDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"StatsDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/StatsDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAGhE,0DAA0D;AAC1D,EAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAyB,CAAC;IAC7D,OAAO;QACL,GAAG,MAAM;QACT,eAAe,EAAE,EAAE,CAAC,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE,MAAM,qBAAqB,GAAG,CAAC,OAAuB,EAAE,EAAE;IACxD,mBAAmB,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE;YACL,gBAAgB,EAAE,IAAI,IAAI,EAAE;YAC5B,OAAO;YACP,oBAAoB,EAAE,CAAC;SACxB;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,KAAC,YAAY,IAAC,QAAQ,EAAC,IAAI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