mirror of https://github.com/garrytan/gstack.git
test: update sidebar tests for model router + longer stopAgent slice
- stopAgent slice 800→1000 to accommodate added error logging lines - Replace hardcoded opus assertion with model router assertions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
700eb903ce
commit
22c35973b1
|
|
@ -296,7 +296,7 @@ describe('TTFO latency chain', () => {
|
||||||
test('stopAgent also calls stopFastPoll', () => {
|
test('stopAgent also calls stopFastPoll', () => {
|
||||||
const stopFn = js.slice(
|
const stopFn = js.slice(
|
||||||
js.indexOf('async function stopAgent()'),
|
js.indexOf('async function stopAgent()'),
|
||||||
js.indexOf('async function stopAgent()') + 800,
|
js.indexOf('async function stopAgent()') + 1000,
|
||||||
);
|
);
|
||||||
expect(stopFn).toContain('stopFastPoll');
|
expect(stopFn).toContain('stopFastPoll');
|
||||||
});
|
});
|
||||||
|
|
@ -989,12 +989,17 @@ describe('sidebar agent conciseness + no focus stealing', () => {
|
||||||
expect(promptSection).toContain('Do NOT keep exploring');
|
expect(promptSection).toContain('Do NOT keep exploring');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('sidebar agent uses opus (not sonnet) for prompt injection resistance', () => {
|
test('sidebar agent auto-routes model based on message type', () => {
|
||||||
|
// Model router exists and defaults to opus for analysis tasks
|
||||||
|
expect(serverSrc).toContain('function pickSidebarModel(');
|
||||||
|
expect(serverSrc).toContain("return 'opus'");
|
||||||
|
expect(serverSrc).toContain("return 'sonnet'");
|
||||||
|
// spawnClaude uses the router, not a hardcoded model
|
||||||
const spawnFn = serverSrc.slice(
|
const spawnFn = serverSrc.slice(
|
||||||
serverSrc.indexOf('function spawnClaude('),
|
serverSrc.indexOf('function spawnClaude('),
|
||||||
serverSrc.indexOf('\nfunction ', serverSrc.indexOf('function spawnClaude(') + 1),
|
serverSrc.indexOf('\nfunction ', serverSrc.indexOf('function spawnClaude(') + 1),
|
||||||
);
|
);
|
||||||
expect(spawnFn).toContain("'opus'");
|
expect(spawnFn).toContain('pickSidebarModel(userMessage)');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('switchTab has bringToFront option', () => {
|
test('switchTab has bringToFront option', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue