Commit Graph

183 Commits

Author SHA1 Message Date
Jorge Manrubia 278a8f9f96 Remove insight response (remaining stuff from the /insight experimental command) 2025-08-11 14:51:40 +02:00
Jorge Manrubia 588f03e927 Remove insight experimental code
Also, downgrade LLM for commands to mini. It's much cheaper and I only upgraded because of the
interpretation complexities that the insight command introduced.

We are implementing a much better approach with Ask.
2025-08-11 13:40:56 +02:00
Jorge Manrubia fbf003d7ec Add comment 2025-07-25 06:32:40 +02:00
Jorge Manrubia 95e065a0c4 Reduce the injected load a bit 2025-07-24 17:33:40 +02:00
Jorge Manrubia 0429dc28f3 Fix for injecting the current context
This is a workaround to make the prototype work. We create a context on the fly to execute AI-derived
commands. When those require listing cards, we ended up losing the notion of "being on a perma screen".
2025-07-24 17:27:32 +02:00
Jorge Manrubia b2ee79bbd0 Format 2025-07-24 16:48:06 +02:00
Jorge Manrubia e61ee25b47 Suite passing 2025-07-24 16:48:05 +02:00
Jorge Manrubia ba97ec05d6 Remove transaction as the AI commands can hold the transaction for too long 2025-07-24 16:48:05 +02:00
Jorge Manrubia 5ad2d09eae Move the hack to fetch completed cards to the insight command logic
We need to rework this as part of the filters revamp. "indexed_by" being
a mix of filters keeps biting us.
2025-07-24 16:48:05 +02:00
Jorge Manrubia fc26329daf Restore default to open cards. Use special "all" value instead.
The change could have side effects (e.g: when running commands).

This also include further changes.
2025-07-24 16:48:04 +02:00
Jorge Manrubia 018c746d2a Make the prompt smarter about the current context to make better calls 2025-07-24 16:48:03 +02:00
Jorge Manrubia dd28e3d1e9 Replace special value with just not asuming that filters are about open cards by default 2025-07-24 16:48:03 +02:00
Jorge Manrubia 9d0887f6bd Use a workaround with a special indexed_by filter to "query all" 2025-07-24 16:48:02 +02:00
Jorge Manrubia 83d743fe2a Make the translator use the /insight command 2025-07-24 16:48:02 +02:00
Jorge Manrubia 7a8bf4895c More prompt fixes 2025-07-24 16:48:01 +02:00
Jorge Manrubia 1c6adf54a8 Restore semantic searches 2025-07-24 16:47:57 +02:00
Jorge Manrubia df9c1e0674 Make sure we pass expressions as a single term
Multiple terms refine the search on each term and works way
worse with the semantic approach
2025-07-24 16:47:54 +02:00
Jorge Manrubia 6080c2aa9b Refine when to filter by cards, make it more relaxes with the expressions it accepts 2025-07-24 16:47:53 +02:00
Jorge Manrubia 2cd4dd8709 Prevent recursion when invoking AI
This can result in stack overflow errors for missing commands.

https://fizzy.37signals.com/5986089/collections/7/cards/1135

Follow up to https://github.com/basecamp/fizzy/pull/766
2025-07-21 10:25:26 +02:00
Jorge Manrubia 39c7a54ad6 Add /user command
The LLM was relying on it. Having it missing resulted in a stack overflow error!

https://fizzy.37signals.com/5986089/collections/7/cards/1135
2025-07-18 17:59:02 +02:00
Jorge Manrubia 921db25646 Make sure it doesn't infer custom abbreviations when matching user names 2025-07-18 17:31:19 +02:00
Jorge Manrubia 16abcf2049 Bump cache version 2025-07-18 14:32:04 +02:00
Jorge Manrubia c144ef68cb Invalidate cache 2025-07-18 14:14:40 +02:00
Jorge Manrubia d9b2a49892 Resolve stages 2025-07-18 12:47:03 +02:00
Jorge Manrubia a1e3835eb8 Prevent 500 when running /search with empty string 2025-07-18 10:55:36 +02:00
Jorge Manrubia 44873e8ac4 More refinements 2025-07-18 06:50:13 +02:00
Jorge Manrubia d81568ff57 Filter by stage id, much better collection filtering 2025-07-18 05:50:22 +02:00
Jorge Manrubia b30bc85f4e Rework prompt to make it less ambiguous and better overall 2025-07-18 05:11:08 +02:00
Jorge Manrubia 1486392b6b WIP 2025-07-17 13:32:37 +02:00
Jorge Manrubia 5f04696fe8 Rewrite prompt to be more accurate and example-driven 2025-07-17 13:32:36 +02:00
Mike Dalessio a099b4101a dep: bump to ruby 3.4.5
Also:

- bump bundler to 2.7.0
- work around the fix for https://bugs.ruby-lang.org/issues/21196 that appeared in 3.4.5
2025-07-16 19:13:39 -04:00
Jorge Manrubia 88074cc7ed Remove unneeded * 2025-07-04 21:57:18 +02:00
Jorge Manrubia 3ed7c940d9 Remove trace 2025-07-04 00:07:03 +02:00
Jorge Manrubia 2cd8df4975 restore the right command 2025-07-04 00:05:52 +02:00
Jorge Manrubia c134df1bb8 Parse commands where it's just a gid properly 2025-07-03 23:10:19 +02:00
Jorge Manrubia 8071c7b522 Store the normalized line not the raw line! 2025-07-03 22:40:16 +02:00
Jorge Manrubia fd418b123e Always resolve rich text commands
I don't remember why I added this but we don't really need it. Also, this result
in potential ambiguity even when you use prompts for standalone tags and mentions
2025-07-03 22:21:50 +02:00
Jorge Manrubia f18b79d464 Rename /add_card => /add 2025-07-03 17:23:56 +02:00
Jorge Manrubia 702169384c Use composite commands even for single commands since they can carry custom titles, which is what we want with AI 2025-07-03 16:26:52 +02:00
Jorge Manrubia bd7b9a442e Merge branch 'main' into fizzy-do-prompts
* main: (57 commits)
  Untenanted access in authenticated controllers should request auth
  dep: bundle update
  dep: update Rails
  dep: bump AR::Tenanted
  Clean up the cable meta tag
  Fix activity feed pagination to fetch on demand
  Create a "published" event if a card is created published
  Scatter Honcho seeds over a 30 day period
  Fix the PWA manifest to use slugged URLs
  Collection publication edits render a turbo frame
  Collection workflow edits render a turbo frame
  Collection entropy config edits render a turbo frame
  Use automatic sizing where supported
  Introduce a separate controller for collection entropy config
  Add `card_id` to index
  Move to scope and inline method
  Prefer modern syntax
  Fix that stage should be visible above card background
  Indicate opens menu
  Hide dialog targets from screen readers when closed
  ...

# Conflicts:
#	db/schema.rb
#	db/schema_cache.yml
2025-07-03 16:11:00 +02:00
Jorge Manrubia 7794dd2fc4 More prompt tweaks 2025-07-03 16:07:21 +02:00
Jorge Manrubia f4147bda27 Support completed by via natural language 2025-07-03 15:52:11 +02:00
Jorge Manrubia ac2400a657 Add /reopen command 2025-07-03 13:52:12 +02:00
Jorge Manrubia a2ca8b1dc0 Improved support to act on cards via ID 2025-07-03 13:09:10 +02:00
Jorge Manrubia 75387891d5 Refine prompt 2025-07-03 12:54:24 +02:00
Jorge Manrubia ca4628b457 Add more tests and fix failing ones 2025-07-03 12:46:36 +02:00
Jorge Manrubia 98e568482a Add clarifying comment 2025-07-03 11:42:29 +02:00
Jorge Manrubia 96faca3ff6 Return standalone command when only one command
this avoids unnecessary redirects
2025-07-03 11:39:46 +02:00
Jorge Manrubia 3684eaa7a0 Format 2025-07-03 11:22:43 +02:00
Jorge Manrubia 8e7268cd6e Use your user gid to resolve yourself, so that this is not ambiguous 2025-07-03 10:09:01 +02:00