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

Added the advanced section, for selecting the tab completion #144

2 changes: 0 additions & 2 deletions webviews/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,13 @@ button:disabled {
font-size: 0.8rem;
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
/* padding: 10px 0; */
text-align: left;
border-radius: 5px;
opacity: 0.4;
display: flex;
flex-direction: column;
align-items: flex-start;
font-size: 12.5px;
/* outline: 1px solid red; */
}

.info-message>p {
Expand Down
63 changes: 29 additions & 34 deletions webviews/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,50 +254,45 @@ function App() {
</div>
</div>

{/* <button
className={`toggle-button ${uiMode === 'advanced' ? 'active' : ''}`}
onClick={() => setUiMode(uiMode === 'simple' ? 'advanced' : 'simple')}
>
{uiMode === 'advanced' ? 'Simple' : 'Advanced'}
</button> */}


{uiMode === 'simple' ? (
<ModelList
className="model-list"
label={uiMode === 'simple' ? "Chat Model" : "Chat / Tab Completion Model" }
label="Granite model"
value={chatModel}
onChange={(e) => setChatModel(e?.value as string | null)}
onChange={(e) => setChatModel(e?.value ?? null)}
status={getModelStatus(chatModel)}
options={modelOptions}
progress={chatModel ? modelPullProgress[chatModel] : undefined}
disabled={!enabled}
tooltip={uiMode === 'simple' ? "This model will be used only for Chat Model" : "This model will be used for both Chat and Tab Completion" }
tooltip="This model will be used for Chat and Tab Completion"
/>

{/* <ModelList
className="model-list"
label="Granite model"
value={chatModel}
onChange={(e) => setChatModel(e?.value ?? null)}
status={getModelStatus(chatModel)}
options={modelOptions}
progress={chatModel ? modelPullProgress[chatModel] : undefined}
disabled={!enabled}
tooltip="This model will be used for Chat and Tab Completion"
/> */}
) : (
<>
<ModelList
className="model-list"
label="Chat model"
value={chatModel}
onChange={(e) => setChatModel(e?.value ?? null)}
status={getModelStatus(chatModel)}
options={modelOptions}
progress={chatModel ? modelPullProgress[chatModel] : undefined}
disabled={!enabled}
tooltip="This model will be used for Chat and Tab Completion"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model will be used for Chat

/>

{/*
<ModelList
className="model-list"
label="Tab completion model"
value={tabModel}
onChange={(e) => setTabModel(e?.value ?? null)}
status={getModelStatus(tabModel)}
options={tabOptions}
progress={tabModel ? modelPullProgress[tabModel] : undefined}
disabled={!enabled}
/>
*/}
<ModelList
className="model-list"
label="Tab completion model"
value={tabModel}
onChange={(e) => setTabModel(e?.value ?? null)}
status={getModelStatus(tabModel)}
options={tabOptions}
progress={tabModel ? modelPullProgress[tabModel] : undefined}
disabled={!enabled}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooltip="This model will be used for Tab Completion"

/>
</>
)}

<ModelList
className="model-list"
Expand Down
Loading