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: add code-editor features to prompt fields #58

Merged
merged 21 commits into from
Jul 5, 2024
Merged

Conversation

fmaclen
Copy link
Owner

@fmaclen fmaclen commented Jul 4, 2024

Copy link

cloudflare-workers-and-pages bot commented Jul 4, 2024

Deploying hollama with  Cloudflare Pages  Cloudflare Pages

Latest commit: e841fe7
Status: ✅  Deploy successful!
Preview URL: https://36b783aa.hollama.pages.dev
Branch Preview URL: https://57-monaco-editor.hollama.pages.dev

View logs

@fmaclen fmaclen changed the title feat: add monaco-editor for prompting feat: add code-editor-like textarea for prompting Jul 4, 2024
@fmaclen fmaclen marked this pull request as ready for review July 4, 2024 21:12
@fmaclen fmaclen changed the title feat: add code-editor-like textarea for prompting feat: add code-editor features to prompt fields Jul 5, 2024
Comment on lines +81 to +83
{#key knowledge}
<FieldTextEditor {handleSubmit} bind:value={content} />
{/key}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Setting a key so the component gets remounted whenever knowledge changes.

Comment on lines +199 to +201
{#key session}
<FieldTextEditor {handleSubmit} bind:value={prompt} />
{/key}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Setting a key so the component gets remounted whenever session changes.

Comment on lines +14 to +15
await expect(modelSelect).toContainText(MOCK_API_TAGS_RESPONSE.models[0].name);
await expect(modelSelect).toContainText(MOCK_API_TAGS_RESPONSE.models[1].name);
Copy link
Owner Author

@fmaclen fmaclen Jul 5, 2024

Choose a reason for hiding this comment

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

Referencing model names from the MOCK_API_TAGS_RESPONSE so we can update the model names in the future without having to find/replace across all of the tests.

NOTE: There are still some hardcoded instances of model names in test/utils.ts.

@fmaclen fmaclen merged commit b8dfe89 into main Jul 5, 2024
2 checks passed
@fmaclen fmaclen deleted the 57-monaco-editor branch July 5, 2024 14:18
@fmaclen
Copy link
Owner Author

fmaclen commented Jul 5, 2024

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Use code editor for all prompting textareas
1 participant