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

VSCE: New Chat History view in quick pick #1692

Closed
abeatrix opened this issue Nov 8, 2023 · 8 comments · Fixed by #2250
Closed

VSCE: New Chat History view in quick pick #1692

abeatrix opened this issue Nov 8, 2023 · 8 comments · Fixed by #2250
Labels
chat/commands Chat and Commands

Comments

@abeatrix
Copy link
Contributor

abeatrix commented Nov 8, 2023

To help people stay in the code editing flow, we want to allow people to quickly navigate to chats from an existing chat editor window, without having to re-open the Cody sidebar view.

Design

It would need a new "Cody: Chats" command that shows a quickpick, and an editor title command button in chat views.

New "Cody: Chats" command

  • Sorted by chat.updated
  • Grouped by relative chat.updated time (see logic below)
  • Search filtering based on title (default quickpick search/filering)

The logic for those separator groupings would be the following (but toLowerCase()’d):

if (chat.updated < 24 hours ago)  return "Today"
if (chat.updated < 48 hours ago)  return "Yesterday"
if (chat.updated < 1 week ago)    return "${n} days ago"
if (chat.updated < 2 weeks ago)   return "Last week"
if (chat.updated < 1 month ago)   return "${n} weeks ago"
if (chat.updated < 2 months ago)  return "Last month"
if (chat.updated >= 2 months ago) return "${n} months ago"

(we intend on using these same groupings in the chat tree view provider as folders, e.g…)

Editor title command button in chat views

Icon: list-unordered

@deepak2431
Copy link
Contributor

@abeatrix, I can work on this issue. Few questions:

  1. How do I enable the magic chat in my dev mode? For me after building the extension, it still opens up the current version.
  2. Is there any UI/UX which I can reference? If not, can you please let me know about the expected behaviour?

@deepak2431
Copy link
Contributor

@abeatrix Nvm, I got the first one working for me.

@deepak2431
Copy link
Contributor

deepak2431 commented Nov 9, 2023

@abeatrix I gave some thoughts on this and came to one of the possible UI/UX we can opt for.

Add a new Icon here in the same row as the Chats Panel as "Show History", which, on click, would open a quick pick, same as it is for the custom commands. What do you think of this?
iScreen Shoter - Code - 231109235348

@deepak2431
Copy link
Contributor

@abeatrix @toolmantim Can you please let me know your views on this?

@abeatrix
Copy link
Contributor Author

From what I remembered, tim wanted a new button in the editor title that would open chat history in quick pick. Or the button will open the sidebar. I actually forgot 😂 will defer to tim to confirm!

@deepak2431
Copy link
Contributor

@abeatrix I see, no problem. Thanks for adding this :)
@toolmantim Can you please confirm about this?

@toolmantim
Copy link
Contributor

Hi @deepak2431! I'm finally put together the details for you in the description to this issue. Let me know if that's clear, or if you've any questions.

@deepak2431
Copy link
Contributor

Hi @toolmantim, Thanks for adding the info for this. Everything is clear to me now for this. I will soon open a PR for this.

toolmantim added a commit that referenced this issue Jan 25, 2024
This PR closes #1692 

- Implemented algorithm to group chats by last interaction timestamp.
- Added an icon in the editor panel to display history chats as a quick
pick, separated by the group.
- Updated the history chats in the Treeview provider to render them as
grouped chats.
- Remove createCodyChatTreeItems, use the updateTree method of
TreeViewProvider to update the list instead.

## Test plan


https://github.com/sourcegraph/cody/assets/44617923/5804d8da-a629-4670-8de9-ff3b3da61e25

---------

Co-authored-by: Tim Lucas <t@toolmantim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat/commands Chat and Commands
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants