Skip to content

sourcegraph/sourcegraph

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

This pushes the
most important content in the history panel (the history items
themselves) much higher, and moves the clear history to just a button
next to the header (instead of a whole section).

| Before | After |
| - | - |
| <img width="1618" alt="Screenshot 2023-04-28 at 5 17 40 pm"
src="https://user-images.githubusercontent.com/153/235084313-6be3495f-72ee-4e97-953c-6f2921861f8e.png">
| <img width="1618" alt="Screenshot 2023-04-28 at 5 18 27 pm"
src="https://user-images.githubusercontent.com/153/235084369-6a6f2ac6-0e12-4b4c-981b-814aa7aa3e07.png">
|

Notes:

* In the process of battling the default button styles, I switched it to
use standard VSCodeButton elements, which give us a bunch of nice
defaults for free (hover etc).
* There's probably more work that can be done in follow up PRs to bring
it up to speed with #51072, and any new work in #51165, but this at
least improves what we have now.
* There was a keyboard handler and tabindex in there, but I couldn't
seem to get it to trigger. Would love help for adding it back in if it
was working.

## Future Fixes / Discussions

1. When starting your first chat, and then clicking history, I was
expecting it to appear in Chat History. But it's more like "Previous
Chat Sessions" — you have to reload, or leave and come back, to have new
things appear. I feel like the current live session could still be there
at the top of the History (if there's been a message sent), and clicking
it would just go back to it.
2. When clicking on a recipe, I thought it would start a new chat, and
the old chat would end up in history. But it just adds to the current
chat 🤔
3. If you use fixup, the chat messages (and therefore chat history
buttons) are a bit empty and awkward. <img width="322" alt="Screenshot
2023-04-28 at 5 49 23 pm"
src="https://user-images.githubusercontent.com/153/235087671-3e584ad2-0d8b-4f13-8c56-f0003b616414.png">
<img width="297" alt="Screenshot 2023-04-28 at 5 51 04 pm"
src="https://user-images.githubusercontent.com/153/235087983-76601551-cdbc-4723-94d2-4e56cc6a54ce.png"><br>
Perhaps it could say "I've updated your code." instead of "Here is my
attempt at rewriting the selected code:"
4. Sometimes the history buttons contain escaped HTML, which would
normally be rendered as HTML in the normal chat. It might be nice to fix
that.

## Test plan

Would appreciate another person’s manual test of this, given it's my
first contribution to the extension 🙏🏼

* With no history, open Chat History view, verify it works okay, and
that Clear History button is disabled
* Perform a chat, reload the window, open Chat History view, verify
buttons and labels
* Perform another chat, reload the window, open Chat History view,
verify buttons and labels
* Click Clear History
b4fa9c9

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
cmd
 
 
dev
 
 
doc
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DocsContributingTwitterDiscord

Build status Scorecard Latest release Discord Contributors


Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.

  • Code search: Search all of your repositories across all branches and all code hosts.
  • Code intelligence: Navigate code, find references, see code owners, trace history, and more.
  • Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.

Getting started



Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains both OSS-licensed and non-OSS-licensed files. We maintain one repository rather than two separate repositories mainly for development convenience.

All files in the enterprise and client/web/src/enterprise fall under LICENSE.enterprise.

The remaining files fall under the Apache 2 license. Sourcegraph OSS is built only from the Apache-licensed files in this repository.