Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

feat: add default prompt mixin to web#1466

Closed
abeatrix wants to merge 1 commit into
mainfrom
bee/web-prompt-mixin
Closed

feat: add default prompt mixin to web#1466
abeatrix wants to merge 1 commit into
mainfrom
bee/web-prompt-mixin

Conversation

@abeatrix

@abeatrix abeatrix commented Oct 23, 2023

Copy link
Copy Markdown
Contributor

RE: https://sourcegraph.slack.com/archives/C052G9Y5Y8H/p1697711213702149

The defaultPromptMixin is added and PromptMixin.add is called in activate event for web client.

Test plan

See if defaultPromptMixin was added to every message submitted by users on web.

@abeatrix abeatrix requested review from 0xnmn and rafax October 23, 2023 19:11
@0xnmn

0xnmn commented Oct 24, 2023

Copy link
Copy Markdown
Contributor

This is meant for VS Code Web or Cody Web Client in SG?

@abeatrix

Copy link
Copy Markdown
Contributor Author

This is meant for VS Code Web or Cody Web Client in SG?

@thenamankumar woops thanks for letting me know.

I just found the set up guide for Cody web, will take a look tomorrow. Thanks again!

@abeatrix abeatrix closed this Oct 24, 2023
abeatrix referenced this pull request Oct 24, 2023
Moved from https://github.com/sourcegraph/cody/pull/1466

refactor: add default prompt mixin to transcripts by default 

- Remove initialization of default prompt mixin by clients.
- Update Transcript to add the default prompt mixin to all interactions
on creation.
- The PromptMixin class allows mixins to be defined that prepend text to
prompts.
- Transcript mixes in all registered PromptMixin instances into the
human prompt text before sending to the assistant.
- This centralizes default prompt handling in Transcript. Clients no
longer need to add the default prompt mixin themselves.
- This also adds the default prompt mixin to web and other clients that
previously have not initialized the PromptMixin at activation.

## Test plan

<!-- Required. See
https://docs.sourcegraph.com/dev/background-information/testing_principles.
-->

You should see `(Reply as Cody, a coding assistant developed by
Sourcegraph...)` prepended to all users' questions:


![image](https://github.com/sourcegraph/cody/assets/68532117/25d31ffa-785d-4233-a778-31ca992a104e)

---------

Co-authored-by: Rafał Gajdulewicz <rafax@users.noreply.github.com>
@abeatrix abeatrix deleted the bee/web-prompt-mixin branch January 17, 2024 18:39
burmudar pushed a commit that referenced this pull request Nov 21, 2024
…ch don't support inlay models. (#1490)

ImaginaryEditor does not support InlayModel and throws an
UnsupportedOperationException; IntentionPreviewEditor throws an
IntentionPreviewUnsupportedOperationException:
UnsupportedOperationException, etc.

Fixes #1488, #1486, #1485, #1480, #1466, #1462, #1435, #1363

## Test plan

```
./gradlew test --tests InlayModelUtilTest
```

Ran the IDE and clicked between editors, requesting autocompletes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants