redhat-developer / vscode-paver

Use IBM Granite LLM as your Code Assistant in Visual Studio Code
Apache License 2.0
6 stars 13 forks source link

added user information to change chat model from continue #103

Closed SachinS10-lab closed 3 weeks ago

SachinS10-lab commented 1 month ago
SachinS10-lab commented 1 month ago

As per James suggestion, I implemented on the info card.

image
fbricon commented 1 month ago

I think I would prefer we showed a single card with those 2 blocks, at the bottom, but only after the setup has completed successfully.

SachinS10-lab commented 1 month ago

Hi @fbricon, I'm sharing a screenshot of the User Information Popup. Currently, I have implemented a closeable popup whenever our chat model is installed, and it will also display after installing our chat model.

image
image

is this okay?

Also I'm unable to fetch details from ~/.continue/config.json due to some permission issue. But now showing the user information popup is working as expected.

fbricon commented 1 month ago

define permission issue please

SachinS10-lab commented 1 month ago

define permission issue please

May be I'm doing wrong, when I'm trying to fetch config file using this command ( const configFile = path.join(os.homedir(), ".continue/config.json"); ) it shows like this " Error checking chat model: TypeError: os.homedir is not a function. at checkChatModel (App.tsx:217:39) ".

I'll push my current change. In current code also checking the installed models and shows the popup.

fbricon commented 1 month ago

I assume you tried accessing the continue config file from the react webview directly, whcih is not possible. Webviews are sandboxed. you need to send information from the vscode backend to the webview frontend via messaging. See for example https://github.com/redhat-developer/vscode-granite/blob/main/src/panels/setupGranitePage.ts#L233-L238

SachinS10-lab commented 4 weeks ago

Hi @fbricon , I have changed custom popup to vscode warning message. Now whenever a selected chat model is configured, it shows the message like in the below screenshot. is this okay?

image
image

the code is added in configureAssistant.ts file.

fbricon commented 4 weeks ago

I'd merge the existing information popup with the new one (information, not warning!): "Continue configuration complete. Select the [granite model] from Continue's chat model dropdown."

fbricon commented 4 weeks ago

also please resolve the conflict

SachinS10-lab commented 4 weeks ago

I'd merge the existing information popup with the new one (information, not warning!): "Continue configuration complete. Select the [granite model] from Continue's chat model dropdown."

sounds good. then I need to add only two line of code in the configureAssistant.ts file. Should I show the other information message (" Upon launching Continue.dev, a welcome screen will be displayed.Make sure to close it before setting up IBM Granite Code Models. ")?

fbricon commented 4 weeks ago

yes the other message should be shown if we can infer Continue's onboarding page will be shown. These days you can check if there's a single model in the config file, where "provider"=== "anthropic" && "apiKey" === ""

SachinS10-lab commented 3 weeks ago

is this okay?

image
fbricon commented 3 weeks ago

please update your PR so I can try it out

SachinS10-lab commented 3 weeks ago

Hi @fbricon, I created a separate PR for the code change. PR Number: #121

NB: After I delete this branch, this PR will be closed.

fbricon commented 3 weeks ago

Closed in favour of #121