489 Commits

Author SHA1 Message Date
Sérgio Saquetim
aa5c968b18
DEV: Remove the legacy widget post menu code (#1225) 2025-04-02 22:32:31 +01:00
Kris
32da999144
FIX: less generic animation names (#1243) 2025-04-02 11:28:10 -04:00
Keegan George
a14fe929a9
FIX: return false if no current user personas (#1241) 2025-04-01 13:47:39 -07:00
Kris
7b56d7d4fc
UX: adjust artificat UI styles (#1240) 2025-04-01 16:11:36 -04:00
Keegan George
f40e094945
FIX: persona setting should compare integer value (#1239)
Oversight from recent feature update: https://github.com/discourse/discourse-ai/pull/1234

We should be comparing integer value of setting, otherwise we will never see continue conversation button.
2025-04-01 11:59:06 -07:00
Keegan George
bf5ccb452c
FEATURE: Continue conversation from Discobot discovery (#1234)
This feature update allows for continuing the conversation with Discobot Discoveries in an AI bot chat. After discoveries gives you a response to your search you can continue with the existing context.
2025-04-01 10:22:39 -07:00
Kris
5331b6dd8e
UX: wider search pane, border, smaller font size (#1238) 2025-04-01 12:57:32 -04:00
Keegan George
f3e78f0d80
FIX: Search discoveries improvements (#1228)
**This update makes a few improvements to search discoveries:**
- [x] in search menu panel: search discoveries should still be triggered when no regular results are present
- [x] in full page search: search discoveries should still be triggered when no regular results are present
- [x] flakiness in search discoveries sometimes not working properly.

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2025-03-31 08:38:40 -07:00
Joffrey JAFFEUX
28fa723472
FIX: forced tools wasn't set correctly when tool has no options. (#1231)
* wip: more dynamic availableForcedTools

* FIX: forced tools wasn't set correctly when tool has no options.

---------

Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
2025-03-31 10:45:03 -03:00
Roman Rizzi
f43137e067
UX: Show AI bot toggles in the AI bot options section (#1229) 2025-03-27 16:46:35 -03:00
Keegan George
6827d63e30
DEV: Streaming animation API for components (#1224)
This takes the logic used in summarization/discoveries for streaming and consolidates it into a single helper lib for smooth streaming. It introduces a new lib: `SmoothStreamer` that can be used by components for smooth streaming text from message bus updates. Additionally, the PR makes use of that new lib in the AI post menu helper.
2025-03-27 08:06:33 -07:00
Keegan George
60fe924ce0
DEV: Remove no longer needed click outside logic (#1223)
The older design approach for sentiment analysis report needed the click outside logic. However, when the design was changed this logic was accidentally left behind. It is potentially causing some negative performance impacts. This PR removes the old unnecessary logic.
2025-03-26 14:24:02 -07:00
Keegan George
bab6f0be43
FIX: Ensure category badging present in sentiment reports (#1222)
This PR ensures that the category badges are present in the sentiment analysis report. Since the core change in https://github.com/discourse/discourse/pull/31795, there was a regression in the post list drill-down where category badges were not being shown. This PR fixes that and also ensures icons/emojis are shown when categories make use of them. This PR also adds the category badge in the table list.
2025-03-26 12:37:41 -07:00
Roman Rizzi
1b05da704e
FIX: Persona editor keeps dirty data after persisting a single field (#1219) 2025-03-26 15:36:01 -03:00
Keegan George
371146cdfe
FIX: Post helper menu results should be selectable (#1221)
This update fixes an issue where the results of the post helper menu was not selectable. Previously, selecting any text inside the menu was immediately closing the menu.
2025-03-26 11:28:57 -07:00
Joffrey JAFFEUX
9a752eff29
FIX: do not error when tools are empty (#1218) 2025-03-26 10:42:43 +01:00
Joffrey JAFFEUX
913314b67d
FIX: prevents to call Object.keys on null (#1217)
This was causing errors in the forms under specific cases.
2025-03-25 22:35:41 +01:00
Keegan George
9dfae3d472
UX: Convert sentiment analysis overview to horizontal bars (#1216)
The sentiment analysis report page initially showcases sentiments via category/tag by doughnut visualizations. However, this isn't an optimal view for quickly scanning and comparing each result. This PR updates the overview to include a table visualization with horizontal bars to represent sentiment analysis instead of doughnuts. Doughnut visualizations are still maintained however when accessing the sentiment data in the drill down for individual entries.

This approach is an intermediary step, as we will eventually add whole clustering and sizing visualization instead of a table. As such, no relevant tests are added in this PR.
2025-03-25 13:36:52 -07:00
Keegan George
50e1bc774a
FIX: unable to click doughnut when no filters (#1213)
This PR fixes an issue where you are unable to click to see the sentiment drill-down when there are no current filters applied. This is due to trying to `JSON.parse()` the filters when there are no filters. This fix ensures there are filters first before trying to parse the JSON.
2025-03-24 10:10:22 -07:00
Joffrey JAFFEUX
7e4f93724d
FIX: bump system prompt limit (#1210)
300 was too low, bumped it to 100_000
2025-03-24 08:47:35 +11:00
Isaac Janzen
95160c80e3
FIX: Remove incorrect full-page-search app event (#1209)
This appEvent is not firing on click, but instead on `resetAiResults`. This action is fired many times during page load.
2025-03-21 14:13:22 -05:00
Roman Rizzi
2a8be6e2d7
REFACTOR: Migrate Personas' form to FormKit (#1178)
* REFACTOR: Migrate Personas' form to FormKit

We re-arranged fields into sections so we can better differentiate which options are specific to the AI bot.

* few form-kit improvements

https://github.com/discourse/discourse/pull/31934

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-03-21 14:46:33 -03:00
Joffrey JAFFEUX
451f7662b2
FIX: prevents fields in Object to re-render (#1205) 2025-03-20 08:32:37 +01:00
Joffrey JAFFEUX
75a1ade441
DEV: supports for form-kit changes (#1203)
form.Object and form.Collection have been changed. Most importantly formObject doesnt yield name but data. It's not your responsibility to build an array of fields.
2025-03-19 15:01:14 +01:00
Sam
b6483e416d
Revert "DEV: Convert tool editor to form kit (#1135)" (#1201)
This reverts commit 107f14456b0e4b51fd2b934ee7cceced78b2e0cc.

enum was not handled, so reverting for now
2025-03-18 18:07:04 +11:00
Keegan George
107f14456b
DEV: Convert tool editor to form kit (#1135)
* DEV: Make tool presets a dropdown

* DEV: Select tool presets via DMenu instead

* WIP

* WIP: Add parameter types, uploader, script, etc.

* WIP

* updates

* fix lint

* FIX: spec

* fixes
2025-03-17 11:38:25 -03:00
Jarek Radosz
7d7c169afa
DEV: Update linting (#1194) 2025-03-17 15:14:53 +11:00
Kris
24e6aa52bb
UX: try AI search to side on large screens (#1196) 2025-03-14 14:11:02 -04:00
Kris
bd40076dc1
FIX: need to create model when testing new embedding (#1192) 2025-03-14 13:11:44 -04:00
Kris
51ca942d7d
REFACTOR: update embeddings to formkit (#1188) 2025-03-13 11:27:38 -04:00
Jarek Radosz
ec8018333e
DEV: Update linting (#1191) 2025-03-13 13:25:38 +00:00
Keegan George
6aaf8a0619
DEV: Use existing topic embeddings when suggesting tags/categories on edit (#1189)
When editing a topic (instead of creating one) and using the
tag/category suggestion buttons. We want to use existing topic
embeddings instead of creating new ones.
2025-03-12 18:52:07 -07:00
Penar Musaraj
ac29d3080f
DEV: Fix SCSS linting issue (#1187) 2025-03-12 13:25:17 -04:00
Keegan George
b17c688162
DEV: Improve title suggester suggestions when editing topic (#1182)
This update ensures topic title suggestions when suggesting from edit topic take into account the whole topic for more accurate title suggestions.
2025-03-11 11:16:06 -07:00
Keegan George
bb32d0d737
FEATURE: Add ability to disable search discoveries (#1177)
This update adds the ability to disable search discoveries. This can be done through a tooltip when search discoveries are shown. It can also be done in the AI user preferences, which has also been updated to accommodate more than just the one image caption setting.
2025-03-10 14:17:58 -07:00
Joffrey JAFFEUX
339251a371
FIX: prevents double escaping of filters (#1179)
---------

Co-authored-by: Keegan George <kgeorge13@gmail.com>
2025-03-10 14:17:24 -07:00
Keegan George
94e0834b88
DEV: Sentiment follow-up updates (#1172)
###  What's new?
- [X] show sentiment counts by color on doughnut without needing to hover
- [X] minor UI padding adjustments
- [X] hide filters that are not allowed to be adjusted in selected chart view
- [X] fix z-index issues with drill-down filters
2025-03-10 09:25:55 -07:00
Keegan George
8863cf0c86
DEV: Updates to sentiment analysis reports (#1161)
**This PR includes a variety of updates to the Sentiment Analysis report:**
- [X] Conditionally showing sentiment reports based on `sentiment_enabled` setting
- [X] Sentiment reports should only be visible in sidebar if data is in the reports
- [X] Fix infinite loading of posts in drill down
- [x] Fix markdown emojis showing not showing as emoji representation
- [x] Drill down of posts should have URL
- [x] ~~Different doughnut sizing based on post count~~ [reverting and will address in follow-up (see: `/t/146786/47`)]
- [X] Hide non-functional export button 
- [X] Sticky drill down filter nav
2025-03-05 13:53:56 -08:00
Kelv
b49d454ad9
DEV: update display name field in AiLlmEditorForm to show more relevant tooltip (#1166) 2025-03-05 16:49:19 +08:00
Sam
f6eedf3e0b
FEATURE: implement thinking token support (#1155)
adds support for "thinking tokens" - a feature that exposes the model's reasoning process before providing the final response. Key improvements include:

- Add a new Thinking class to handle thinking content from LLMs
- Modify endpoints (Claude, AWS Bedrock) to handle thinking output
- Update AI bot to display thinking in collapsible details section
- Fix SEARCH/REPLACE blocks to support empty replacement strings and general improvements to artifact editing
- Allow configurable temperature in triage and report automations
- Various bug fixes and improvements to diff parsing
2025-03-04 12:22:30 +11:00
Martin Brennan
3f20b24aa3
FIX: Use route for admin sentiment sidebar links (#1160)
Minor, but there is a core bug when using `href` at the moment,
this fixes the issue, and I will do more in core separately.
2025-03-03 15:37:45 +10:00
Kris
5368b0c7d0
UX: add links to sentiment to admin sidebar (#1158) 2025-02-28 15:29:04 -05:00
Keegan George
a3fb5cdc21
FIX: Subsequent results in full page search should re-trigger discovery (#1156)
This update fixes an issue where subsequent results in full page search were not trigger Discobot discoveries to search for the new result.
2025-02-27 10:18:42 -08:00
Keegan George
e15952031d
UX: Smoother streaming for discoveries (#1154)
## 🔍 Overview
This update ensures that the streaming for discoveries is smoother, especially on first update.


##  More details
To help with smoother streaming, the discovery preview (which was being tracked as a separate property in the JS logic) will be removed and the entire discovery content will be shown/hidden via the existing CSS. The preview was already receiving the full update even though it was visually hidden, so removing the separate property shouldn't have any negative performance hit. Visually hiding it with CSS only will help simplify the component and also allow for smoother streaming. We will instead remove the buffered streaming approach and instead use typing timers similar to what we did for streaming summarization. 

No related tests as streaming animations are difficult to test.
2025-02-27 07:32:39 -08:00
Martin Brennan
aa13d16022
UX: Add description to configuration nav (#1153)
This will be used in the new admin search UI
2025-02-26 10:54:45 +10:00
Keegan George
9aafca03f5
UX: Improvements to sentiment analysis report (#1150)
This update improves some of the UI around sentiment analysis reports:

1. Improve titles so it is above and truncated when long
2. Change doughnut to only show total count
3. Ensures sentiment posts have dates
4. Ensure expand post doesn't appear on short posts
2025-02-25 07:47:30 -08:00
Sam
fe19133dd4
FEATURE: full support for Sonnet 3.7 (#1151)
* FEATURE: full support for Sonnet 3.7

- Adds support for Sonnet 3.7 with reasoning on bedrock and anthropic
- Fixes regression where provider params were not populated

Note. reasoning tokens are hardcoded to minimum of 100 maximum of 65536

* FIX: open ai non reasoning models need to use deprecate max_tokens
2025-02-25 17:32:12 +11:00
Sam
84e791a941
FIX: legacy reasoning models not working, missing provider params (#1149)
* FIX: legacy reasoning models not working, missing provider params

1. Legacy reasoning models (o1-preview / o1-mini) do not support developer or system messages, do not use them.
2. LLM editor form not showing all provider params due to missing remap

* add system test
2025-02-24 16:38:23 +11:00
Keegan George
08377bab35
DEV: Sentiment analysis report follow-up updates (#1145)
* DEV: make include subcategories checkbox operational

* DEV: add pagination for post requests

* WIP: selected chart UX improvements

* DEV: Functional sentiment filters

* DEV: Reset filters after going back

* DEV: Add category colors, improve UX

* DEV: Update spec
2025-02-24 16:21:10 +11:00
Kris
55dde0a9e6
UX: minor adjustments to search bot (#1146) 2025-02-21 19:40:53 -05:00