Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make quick actions add user messages to chat window #153

Open
bracesproul opened this issue Oct 28, 2024 · 1 comment · May be fixed by #185
Open

Make quick actions add user messages to chat window #153

bracesproul opened this issue Oct 28, 2024 · 1 comment · May be fixed by #185
Labels

Comments

@bracesproul
Copy link
Member

I want to have a user message appear when the user triggers a new quick action, so they can clearly see what the sequence of requests are in the chat window. These messages should never be forwarded to the server (I believe you don't need to do anything special to ensure this, but double check). The flow should be as follows:

  1. a user triggers a new quick action
  2. Where we kick off a new streamMessage call, we should ensure we're also updating the messages in state, without sending them to the server.

The messages should be the following:

Writing tools

  • translate -> Translate my artifact to ${language}
  • reading level -> Rewrite my artifact to be at a ${"PhD" | "college student" | "teenager" | "child"} reading level. or Rewrite my artifact to sound like a pirate
  • adjust length -> Update my artifact to be ${"much longer" | "longer" | "shorter" | "much shorter"}`
  • add emojis -> Add emojis to my artifact

Coding tools

  • add comments -> Add descriptive inline comments to my code.
  • add logs -> Insert log statements into my code.
  • port language -> Port the code to ${language}.
  • fix bugs -> Fix any potential bugs in my code.

Custom artifacts

The message should be: Please use my custom quick action "${quick action name}" to update my artifact.

@ahmad2b
Copy link
Contributor

ahmad2b commented Nov 5, 2024

Hey @bracesproul! 👋

I've submitted a PR (#185 ) that implements user messages for all quick actions in the chat window. Here's what was added:

Message handling for:

  • Text actions (translate, reading level adjustments, etc)
  • Code actions (comments, logs, language porting, etc)
  • Custom quick actions

Example messages:

"Translate my artifact to Spanish"
"Rewrite my artifact to be at a PhD reading level"
"Add descriptive inline comments to my code"
"Please use my custom quick action 'Format Code' to update my artifact"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants