Skip to content

Implement multi-agent pipeline architecture and improve chat features - #8

Merged
Waterkyuu merged 169 commits into
mainfrom
feat/general
Apr 27, 2026
Merged

Implement multi-agent pipeline architecture and improve chat features#8
Waterkyuu merged 169 commits into
mainfrom
feat/general

Conversation

@Waterkyuu

Copy link
Copy Markdown
Owner

No description provided.

Waterkyuu added 30 commits April 9, 2026 05:15
Extract message rendering logic into separate AssistantMessage and UserMessage
components to improve code organisation, maintainability and clear component
boundaries.

Additional changes:
- Remove redundant displayName declarations from memo wrapped components
- Update application brand name from Fire Wave to Refract in translations
- Add tool call id field to message item test fixture
- Clean up imports and reduce MessageItem component complexity
Apply flex alignment properties to text container and inner paragraph
elements to consistently center single line text vertically within
assistant message blocks. Fixes inconsistent vertical spacing that
occurred when using only line height for content positioning.
Replace plain text paragraph elements with react-markdown component to support
formatted content in assistant responses. Apply tailwind prose styling classes
and add the required react-markdown production dependency.
Replace generic Request type with correct Next.js NextRequest type across
all chat and file API route handlers. Add missing type imports and apply
proper type annotations for all route handler request parameters.

Also remove unnecessary 'use client' directive from message item component.
- Add lib/agent/skills/index.ts: skill loader that parses SKILL.md files with YAML frontmatter
- Update lib/agent/prompts.ts: inject available skill list into system prompt with Typst expert role
- Update lib/agent/tools.ts: add loadSkill tool for on-demand skill content loading
- Skills loaded: typst-expert, paper-expert, note-expert
- Only renders visible rows (overscan: 10) instead of all rows in DOM
- Fixes import paths for extracted panel components
- Install @myriaddreamin/typst.ts, typst-ts-web-compiler, typst-ts-renderer
- Fix module import to use dynamic import in web worker
- Copy WASM files to public/ for runtime loading
- Add workspaceTypstContentAtom and showTypstWorkspaceAtom atoms
- Add 'typst' to WorkspaceView type
- Add TypstPreview panel to workspace-panel with FileText icon
- Add i18n keys for typstViewer (en/zh)
- Add Orchestrator Agent (glm-4.5-x fast model) for pipeline planning
- Add Data Agent for reading/cleaning data with scoped tools
- Add Chart Agent for visualization generation with scoped tools
- Add Report Agent for technical writing with load_skill support
- Create pipeline executor with sequential step execution
- Add pipeline context builder for inter-agent data passing
- Add pipeline atoms (Jotai) for UI state management
- Create usePipelineChat hook with SSE streaming + fallback to single mode
- Refactor API route to support both pipeline and single agent modes
- Each agent uses glm-4.7 for execution, orchestrator uses glm-4.5-x
Waterkyuu and others added 26 commits April 26, 2026 08:37
…review

- Add typstContent optional field to ReportOutputSchema
- Regex-extract typst content from fenced code blocks in resolveReportOutput
- Set typst content into workspace atom for TypstPreview display on step-complete
… to Plans

The test file was updated to match the UI text change from "Pipeline Steps" to "Plans" in the StepPanel component. This ensures the test continues to correctly locate and interact with the button using the updated text.
… agent

Report agent now outputs typst code directly in fenced code blocks
without calling sandbox tools, avoiding the tool-call failure loop.
- Remove codeInterpreter and persistCodeFile from report-tools
- Simplify prompt to just output typst + JSON
- Make artifact optional in ReportOutputSchema
- Relax resolveReportOutput to not require persisted artifact
- Frontend handles report step with or without artifact
- Report agent only has loadSkill tool (no codeInterpreter/persistCodeFile)
- Prompt requires loadSkill for typst-expert + category skill
- No JSON output requirement - just typst fenced code block
- ReportOutputSchema simplified to only { typstContent: string }
- Frontend directly sets typst content into workspace atom
…eview survives re-derivation

The report agent successfully generated typst content, but the workspace
preview disappeared because deriveWorkspaceSnapshotFromMessages ran in a
useEffect after chat.setMessages, overwriting the atom-set typstContent
with an empty derived snapshot that didn't know about typst parts.

- Add TypstContentPipelinePart type and push it into assistantParts when
  the report step completes, so typst content persists in the message.
- Update deriveWorkspaceSnapshotFromMessages to recognise the new
  typst-content part and set snapshot.typstContent + view accordingly.
- Remove temporary report-debug console.log statements.
Co-authored-by: Codex <noreply@openai.com>
Worker threads cannot resolve root-relative paths like /file.wasm into
full URLs. Use self.location.origin to construct absolute URLs for the
typst compiler and renderer WASM modules.
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
This change provides developers with a template for required environment variables
including API keys, database URLs, and other configuration needed for the project.
The updated .gitignore allows committing specific environment files while
excluding local development files.
Add dotenv-cli dependency and modify database scripts to use environment variables from .env.local file for secure configuration management.
- Normalize report-agent Typst output before returning typstContent
- Add browser-safe default #set text font stack when missing
- Patch existing #set text font rules to include fallback: true
- Replace fallback: false with fallback: true for frontend WASM rendering
- Prompt report-agent to include the safe font fallback by default
- Cover resolver and Typst fallback behavior with regression tests

Co-authored-by: Codex <noreply@openai.com>
…mple

This change adds proper syntax highlighting to the Typst code example and includes the `fallback: true` parameter to demonstrate proper text fallback configuration.
This change updates the Typst documentation with improved formatting, fixes syntax highlighting in code examples, and enhances the font configuration example.
- Register Typst font assets for backend compilation
- Include text, cjk, and emoji assets before report SVG generation
- Add regression coverage for backend font asset configuration
- Fix provider typing to match TypstSnippet.use

Co-authored-by: Codex <noreply@openai.com>
- Share Typst font asset configuration across backend and frontend compilers
- Load text, cjk, and emoji assets in the browser Typst worker
- Send compile messages with the worker content field after worker readiness
- Add regression tests for font asset registration and preview worker messages

Co-authored-by: Codex <noreply@openai.com>
@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fire-wave-agent Ready Ready Preview, Comment Apr 27, 2026 2:11am

@Waterkyuu
Waterkyuu merged commit 7934664 into main Apr 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant