nickkeesG / Pantheon

Experimental LLM interface exploring new ways to use AI to improve human thinking
https://pantheon.chat
GNU General Public License v3.0
12 stars 2 forks source link

Daemon mentions #69

Closed nickkeesG closed 2 months ago

nickkeesG commented 3 months ago

CHANGES TO REDUX STATE

This contains two changes: 1) Ideas now have a "type" which identifies them as either "user", "instruction, or "response" This differentiates between instructions and responses to instructions, and replaces the boolean variable isUser. For migration, I recommend setting all every instance where isUser = true to type = "user" and every instance where IsUser = false to type = "instruction". You could be fancy maybe and alternate "instruction" and "response" to be totally correct, but I wouldn't stress about it. Currently the only way this is used is in setting a small indent for cases where type = "response" so that it's visually clear to the user.

2) I've implemented mentions. Ideas now have a variable "mentions" which records the name of the daemon (if any) that was mentioned. This is detected by the synchronizer, which checks active daemons and records the first match in the ideaText to an active daemon. This will appear as blue text in the UI. A mention must be preceded by a @ symbol. The code for coloring the text is pretty nutso, because each token gets rendered one by one. I spent a lot of time trying to find a simpler solution, but I think this is the best I can do. It seems to work pretty well though, and all the grossness is contained within IdeaText.tsx, so it's not too bad.

Currently, when the daemon manager selects a daemon to comment on an idea, it first checks for a mention (idea.mention). If there is a mention, then that daemon will comment. If there is no mention, then a random daemon will comment.

Again, the redux has been changed in the Idea object in which

EDIT: I've switched the type "user" to "thought" to be more clear

netlify[bot] commented 3 months ago

Deploy Preview for gleeful-biscuit-343233 ready!

Name Link
Latest commit 65ce884160c7823e79645e27bffbaa1be5a680bc
Latest deploy log https://app.netlify.com/sites/gleeful-biscuit-343233/deploys/66699ba5e3d999000840dbe6
Deploy Preview https://deploy-preview-69--gleeful-biscuit-343233.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 66 (πŸ”΄ down 34 from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

sofvanh commented 3 months ago

Hmm, I'm not fully happy with this implementation.

sofvanh commented 3 months ago

Maybe the best course of action would be for me to adopt this + the next PR, rewrite stuff and fix bugs and merge when I think they're ready? What do you think @nickkeesG ?

nickkeesG commented 3 months ago

Mentions are always active, I don't think this is an issue. The surprisal metric option only toggles whether the highlighting is shown to the user, it is always being calculated. I'm planning to use surprisal again in prioritizing ideas.

nickkeesG commented 3 months ago

The highlighting as the user is typing sounds awesome, I'd love that. If you think you could make that happen I'd be happy to let you take over on this feature, and merge it when you're happy.