fix: rename h5 execution override to deep reasoning

This commit is contained in:
john
2026-07-04 14:57:13 +08:00
parent 12268110f7
commit e4657c7e55
13 changed files with 79 additions and 73 deletions
+16 -16
View File
@@ -263,10 +263,10 @@ test('agent run uses direct chat service for eligible chat messages', async () =
userAuth: {},
tkmindProxy: {
async startSessionForUser() {
assert.fail('goose session should not start for direct chat');
assert.fail('backend session should not start for direct chat');
},
async submitSessionReplyForUser() {
assert.fail('goose reply should not be submitted for direct chat');
assert.fail('backend reply should not be submitted for direct chat');
},
},
directChatService: {
@@ -301,7 +301,7 @@ test('agent run uses direct chat service for eligible chat messages', async () =
assert.ok(pool.events.some((event) => event.eventType === 'direct_chat_completed'));
});
test('agent run escalates direct sessions to a new goose session when forced', async () => {
test('agent run escalates direct sessions to a new backend session when forced', async () => {
const pool = createFakePool();
const submitted = [];
const gateway = createAgentRunGateway({
@@ -309,7 +309,7 @@ test('agent run escalates direct sessions to a new goose session when forced', a
tkmindProxy: {
async startSessionForUser(userId) {
assert.equal(userId, 'user-1');
return { id: 'goose-session-1' };
return { id: 'deep-session-1' };
},
async submitSessionReplyForUser(userId, sessionId, requestId, userMessage, options = {}) {
submitted.push({ userId, sessionId, requestId, userMessage, options });
@@ -320,15 +320,15 @@ test('agent run escalates direct sessions to a new goose session when forced', a
const run = await gateway.createRun('user-1', {
sessionId: 'h5direct_existing',
requestId: 'req-force-goose',
requestId: 'req-force-deep',
userMessage: { role: 'user', content: [{ type: 'text', text: '帮我生成页面 public/a.html' }] },
forceGoose: true,
forceDeepReasoning: true,
});
await waitFor(() => pool.runs.get(run.id)?.status === 'succeeded');
assert.equal(pool.runs.get(run.id).agent_session_id, 'goose-session-1');
assert.equal(submitted[0].sessionId, 'goose-session-1');
assert.ok(pool.events.some((event) => event.eventType === 'direct_session_escalated_to_goose'));
assert.equal(pool.runs.get(run.id).agent_session_id, 'deep-session-1');
assert.equal(submitted[0].sessionId, 'deep-session-1');
assert.ok(pool.events.some((event) => event.eventType === 'direct_session_escalated_to_deep_reasoning'));
});
test('agent run with code tool mode starts and submits with code policy', async () => {
@@ -369,7 +369,7 @@ test('agent run with code tool mode starts and submits with code policy', async
assert.equal(submitted[0].userMessage.metadata.memindRun.toolMode, 'code');
});
test('agent run with enabled tool gateway dispatches code runs outside goose session', async () => {
test('agent run with enabled tool gateway dispatches code runs outside backend session', async () => {
const pool = createFakePool();
const jobs = [];
const gateway = createAgentRunGateway({
@@ -382,10 +382,10 @@ test('agent run with enabled tool gateway dispatches code runs outside goose ses
},
tkmindProxy: {
async startSessionForUser() {
assert.fail('goose session should not start for external tool gateway run');
assert.fail('backend session should not start for external tool gateway run');
},
async submitSessionReplyForUser() {
assert.fail('goose reply should not be submitted for external tool gateway run');
assert.fail('backend reply should not be submitted for external tool gateway run');
},
},
toolGateway: {
@@ -434,10 +434,10 @@ test('agent run validates expected tool gateway artifacts before succeeding', as
},
tkmindProxy: {
async startSessionForUser() {
assert.fail('goose session should not start for external tool gateway run');
assert.fail('backend session should not start for external tool gateway run');
},
async submitSessionReplyForUser() {
assert.fail('goose reply should not be submitted for external tool gateway run');
assert.fail('backend reply should not be submitted for external tool gateway run');
},
},
toolGateway: {
@@ -505,10 +505,10 @@ test('agent run fails non-retryably when tool gateway artifact validation fails'
},
tkmindProxy: {
async startSessionForUser() {
assert.fail('goose session should not start for external tool gateway run');
assert.fail('backend session should not start for external tool gateway run');
},
async submitSessionReplyForUser() {
assert.fail('goose reply should not be submitted for external tool gateway run');
assert.fail('backend reply should not be submitted for external tool gateway run');
},
},
toolGateway: {