feat: update Makelore modules and conversations
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-07-31 10:08:41 +08:00
parent b8ca3f8eea
commit 80e8386fa6
175 changed files with 8036 additions and 10581 deletions

View File

@@ -6,9 +6,40 @@ import {
getToolVisibilityId,
} from '@/pages/Chat/chat-transcript';
import { stripProcessMessagePrefix } from '@/pages/Chat/message-utils';
import { hydrateOpenCodeSession } from '@/lib/opencode-session-state';
import type { RawMessage, ToolStatus } from '@/types/chat';
describe('deriveTaskSteps', () => {
it('uses canonical Part order to keep pre-subtask text in the execution trace', () => {
const transcript = hydrateOpenCodeSession('ses_native', [{
info: { id: 'msg_native', role: 'assistant', sessionID: 'ses_native' },
parts: [
{ id: 'part_narration', type: 'text', text: 'Inspecting the project.' },
{ id: 'part_subtask', type: 'subtask', sessionID: 'ses_child' },
{ id: 'part_answer', type: 'text', text: 'The project is ready.' },
],
}]);
const steps = deriveTaskSteps({
messages: [{
id: 'msg_native',
role: 'assistant',
content: [
{ type: 'text', id: 'part_narration', text: 'Inspecting the project.' },
{ type: 'text', id: 'part_answer', text: 'The project is ready.' },
],
}],
nativeTranscript: transcript,
streamingMessage: null,
streamingTools: [],
});
expect(steps).toEqual(expect.arrayContaining([
expect.objectContaining({ kind: 'message', detail: 'Inspecting the project.' }),
expect.objectContaining({ kind: 'system', id: 'native-part_subtask' }),
]));
expect(steps.some((step) => step.detail === 'The project is ready.')).toBe(false);
});
it('builds running steps from streaming thinking and tool status', () => {
const streamingTools: ToolStatus[] = [
{