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

Save input value as IChatTransferData for restoring after transfer #188543

Merged
merged 2 commits into from Jul 25, 2023

Conversation

bhavyaus
Copy link
Contributor

@bhavyaus bhavyaus commented Jul 21, 2023

This fixes restoring chat input on transferring to a new workspace.

@bhavyaus bhavyaus changed the title Save chat input in model for restoring later Save chat input in chatModel for restoring later Jul 21, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the July 2023 milestone Jul 21, 2023
@joyceerhl joyceerhl linked an issue Jul 21, 2023 that may be closed by this pull request
@roblourens
Copy link
Member

I don't like this approach because IChatModel seems like the wrong place for this data, and that interface is read-only for all other content. I'd have to think about a better way to transfer some view state along with the session data. The idea is to keep the same input in the input box after you click the button to open the new project, in case I started typing a question? That's ok, it doesn't sound like a common scenario though.

@bhavyaus
Copy link
Contributor Author

The idea is to keep the same input in the input box after you click the button to open the new project, in case I started typing a question? That's ok, it doesn't sound like a common scenario though.

Yes. After we've transferred the session over to a new workspace, we'd like to preserve the /createWorkspace in the input.
The other scenario is moving from the panel chat to the editor.

Currently we store and restore the input state in the chatViewPane at a WORKSPACE level. I'll check to see there's a change I can make there.

@bhavyaus bhavyaus changed the title Save chat input in chatModel for restoring later Save input value as IChatTransferData for restoring after transfer Jul 22, 2023
@bhavyaus bhavyaus requested a review from roblourens July 23, 2023 02:11
@bhavyaus bhavyaus merged commit 4767096 into main Jul 25, 2023
6 checks passed
@bhavyaus bhavyaus deleted the dev/bhavyau/chat-input branch July 25, 2023 17:07
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
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.

Open Session in Editor loses input editor contents
3 participants