Skip to content

Refactor AI pipeline and implement History V3 with thread support#12

Merged
sleroq merged 16 commits intomasterfrom
feat/reply-method-fallbacks
Mar 8, 2026
Merged

Refactor AI pipeline and implement History V3 with thread support#12
sleroq merged 16 commits intomasterfrom
feat/reply-method-fallbacks

Conversation

@sleroq
Copy link
Copy Markdown
Owner

@sleroq sleroq commented Mar 8, 2026

Summary

  • Implement History V3 with full thread support for multi-branch conversation tracking
  • Optimize chat history loading and storage with structured metadata blocks (slusha_meta)
  • Refactor AI chat pipeline into modular context/generation flow
  • Add configurable ai.replyMethod (json_actions or plain_text_reactions) with fallback retries across full context, shorter history, and reduced context without bot notes/memory
  • Add prompt customization (toolPrompt, stepPrompt) and metadata-based target reference parsing
  • Refactor text splitting to use blank lines for better content segmentation
  • Remove deprecated useJsonResponses config option; rename chat reactions config fields for clarity

Key Changes

  • History V3: New thread-aware history format with parent/child message relationships
  • Metadata Blocks: Structured slusha_meta tags for message attribution and context
  • AI Fallbacks: Multi-tier retry system when AI responses fail or timeout
  • Plain Text Reactions: Support for send_chat_reactions tool via plain text for reliability

Verification

  • deno check --allow-import main.ts
  • deno lint
  • AI_TOKEN="test" deno test -A
  • scripts/build.bash
  • deno task check (widget)
  • deno task lint (widget)
  • deno task build (widget)

@sleroq sleroq changed the title Add configurable AI reply methods with fallback retries Refactor AI chat pipeline with configurable reply methods Mar 8, 2026
@sleroq sleroq changed the title Refactor AI chat pipeline with configurable reply methods Refactor AI pipeline and implement History V3 with thread support Mar 8, 2026
@sleroq sleroq merged commit 0ae46f0 into master Mar 8, 2026
7 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