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

feat(prompts): Render prompt messages on prompt detail view #5786

Merged

Conversation

cephalization
Copy link
Contributor

@cephalization cephalization commented Dec 19, 2024

Depends on #5777

chat.messages.mov

Syntax highlighting works as well

image

Resolves #5759

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Dec 19, 2024
Base automatically changed from cephalization/prompts/5777-show-invocation-params-prompt-details to prompts December 19, 2024 19:00
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Dec 19, 2024
@cephalization cephalization force-pushed the cephalization/prompts/5759-connect-prompt-chat-messages branch from e4f65bc to ca52b0f Compare December 19, 2024 19:31
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Dec 19, 2024
app/src/components/templateEditor/TemplateEditor.tsx Outdated Show resolved Hide resolved
const messages = useMemo(() => {
const parsedTemplate = PromptChatTemplateSchema.safeParse(template);
if (!parsedTemplate.success) {
return [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: display an error if you fail to parse? I guess this code will go away

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is intended to be deleted next PR ideally

app/src/pages/prompt/PromptVersionsList.tsx Outdated Show resolved Hide resolved
app/src/pages/prompt/PromptVersionsList.tsx Outdated Show resolved Hide resolved
app/src/pages/prompt/PromptVersionsList.tsx Outdated Show resolved Hide resolved
app/src/pages/prompt/promptVersionsLoader.tsx Outdated Show resolved Hide resolved
@cephalization cephalization merged commit 1cc525c into prompts Dec 20, 2024
49 checks passed
@cephalization cephalization deleted the cephalization/prompts/5759-connect-prompt-chat-messages branch December 20, 2024 00:01
mikeldking pushed a commit that referenced this pull request Dec 26, 2024
* feat(prompts): Render prompt messages on prompt detail view

* Remove unused import

* Implement copy and paste button on prompt chat messages

* Render chat messages on prompt version details page

* Redirect to latest version when clicking versions tab

Additionally highlight active version in versions list

* Update example data to match template language

* Fix prompt details page width, prompt versions borders / scroll

* Distinguish readOnly TemplateEditor styling from normal TemplateEditor

* Refactor active prompt id into prop

* Replace custom button with styled anchor

* Rename node in promptVersion query
mikeldking pushed a commit that referenced this pull request Dec 26, 2024
* feat(prompts): Render prompt messages on prompt detail view

* Remove unused import

* Implement copy and paste button on prompt chat messages

* Render chat messages on prompt version details page

* Redirect to latest version when clicking versions tab

Additionally highlight active version in versions list

* Update example data to match template language

* Fix prompt details page width, prompt versions borders / scroll

* Distinguish readOnly TemplateEditor styling from normal TemplateEditor

* Refactor active prompt id into prop

* Replace custom button with styled anchor

* Rename node in promptVersion query
mikeldking pushed a commit that referenced this pull request Dec 27, 2024
* feat(prompts): Render prompt messages on prompt detail view

* Remove unused import

* Implement copy and paste button on prompt chat messages

* Render chat messages on prompt version details page

* Redirect to latest version when clicking versions tab

Additionally highlight active version in versions list

* Update example data to match template language

* Fix prompt details page width, prompt versions borders / scroll

* Distinguish readOnly TemplateEditor styling from normal TemplateEditor

* Refactor active prompt id into prop

* Replace custom button with styled anchor

* Rename node in promptVersion query
mikeldking pushed a commit that referenced this pull request Dec 28, 2024
* feat(prompts): Render prompt messages on prompt detail view

* Remove unused import

* Implement copy and paste button on prompt chat messages

* Render chat messages on prompt version details page

* Redirect to latest version when clicking versions tab

Additionally highlight active version in versions list

* Update example data to match template language

* Fix prompt details page width, prompt versions borders / scroll

* Distinguish readOnly TemplateEditor styling from normal TemplateEditor

* Refactor active prompt id into prop

* Replace custom button with styled anchor

* Rename node in promptVersion query
mikeldking pushed a commit that referenced this pull request Dec 31, 2024
* feat(prompts): Render prompt messages on prompt detail view

* Remove unused import

* Implement copy and paste button on prompt chat messages

* Render chat messages on prompt version details page

* Redirect to latest version when clicking versions tab

Additionally highlight active version in versions list

* Update example data to match template language

* Fix prompt details page width, prompt versions borders / scroll

* Distinguish readOnly TemplateEditor styling from normal TemplateEditor

* Refactor active prompt id into prop

* Replace custom button with styled anchor

* Rename node in promptVersion query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants