discourse-ai/lib/ai_bot
Sam 117c06220e
FEATURE: allow artifacts to be updated (#980)
Add support for versioned artifacts with improved diff handling

* Add versioned artifacts support allowing artifacts to be updated and tracked
  - New `ai_artifact_versions` table to store version history
  - Support for updating artifacts through a new `UpdateArtifact` tool
  - Add version-aware artifact rendering in posts
  - Include change descriptions for version tracking

* Enhance artifact rendering and security
  - Add support for module-type scripts and external JS dependencies
  - Expand CSP to allow trusted CDN sources (unpkg, cdnjs, jsdelivr, googleapis)
  - Improve JavaScript handling in artifacts

* Implement robust diff handling system (this is dormant but ready to use once LLMs catch up)
  - Add new DiffUtils module for applying changes to artifacts
  - Support for unified diff format with multiple hunks
  - Intelligent handling of whitespace and line endings
  - Comprehensive error handling for diff operations

* Update routes and UI components
  - Add versioned artifact routes
  - Update markdown processing for versioned artifacts

Also

- Tweaks summary prompt
- Improves upload support in custom tool to also provide urls
2024-12-03 07:23:31 +11:00
..
personas FEATURE: allow artifacts to be updated (#980) 2024-12-03 07:23:31 +11:00
tools FEATURE: allow artifacts to be updated (#980) 2024-12-03 07:23:31 +11:00
bot.rb FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
entry_point.rb FIX: Correctly register 'info' icon (#950) 2024-11-25 10:20:17 -03:00
playground.rb FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
post_streamer.rb FIX: cancel functionality regressed (#938) 2024-11-21 17:51:45 +11:00
question_consolidator.rb FEATURE: GPT4o support and better auditing (#618) 2024-05-14 13:28:46 +10:00
response_http_streamer.rb FEATURE: support custom instructions for persona streaming (#890) 2024-11-05 07:43:26 +11:00
site_settings_extension.rb DEV: Rewire AI bot internals to use LlmModel (#638) 2024-06-18 14:32:14 -03:00
tool_runner.rb FEATURE: allow artifacts to be updated (#980) 2024-12-03 07:23:31 +11:00