Skip to content

Commit

Permalink
Add instance banners support (#6372)
Browse files Browse the repository at this point in the history
Fixes
https://linear.app/sourcegraph/issue/CODY-4104/[morgan-stanley]-ability-to-show-a-message-with-a-disclaimer-on-the-ui

This PR adds support for instance level banners in cody chat UI. It
renders up to 240 symbols and supports markdown syntax. This is the
first iteration of this just to fulfil CODY-4104 needs.

Message and title are customizable by instance global settings, via
`cody.notices` fields.

For instance, configuration for message from the screenshots 

```
 "cody.notices": [
    {
      "key": "testing-banner-key-2",
      "title": "Hi Sourcegraph!",
      "message": "This is testing message to test our new custom message banner, say hi to Felix from me. [Happy holidays](https://www.youtube.com/watch?v=E8gmARGvPlI) \n And special shout out to Search team."
    }
  ],
```

| Cody Web | VSCode |
| --------- | --------- | 
| <img width="1223" alt="Screenshot 2024-12-16 at 20 08 12"
src="https://github.com/user-attachments/assets/2cac18b3-9b31-4662-a5a9-866b8461181c"
/> | <img width="1092" alt="Screenshot 2024-12-16 at 20 06 00"
src="https://github.com/user-attachments/assets/221b7f3c-d089-4041-be5e-11b69b4e6f3f"
/> |
 
## Test plan
- Run local vs code extension connected to s2; you should see the banner
as shown in the screenshots above.
  • Loading branch information
vovakulikov authored Dec 17, 2024
1 parent 4da049a commit 7e359e3
Show file tree
Hide file tree
Showing 21 changed files with 1,415 additions and 113 deletions.
273 changes: 273 additions & 0 deletions agent/recordings/auth_2503977039/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7e359e3

Please sign in to comment.