Skip to content

Commit 5b796ad

Browse files
committed
Working
1 parent 35aad68 commit 5b796ad

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

src/api/providers/pearai/pearai.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export class PearAiHandler extends BaseProvider implements SingleCompletionHandl
6464

6565
if (modelId.startsWith("pearai")) {
6666
try {
67+
// TODO: For some reason, if we move this fetch to above this if statement, it breaks everything)
6768
const response = await fetch(`${PEARAI_URL}/getPearAIAgentModels`)
6869
if (!response.ok) {
6970
throw new Error(`Failed to fetch models: ${response.statusText}`)
@@ -117,6 +118,7 @@ export class PearAiHandler extends BaseProvider implements SingleCompletionHandl
117118
}
118119

119120
getModel(): { id: string; info: ModelInfo } {
121+
// TODO: this.pearAiModelsResponse is always undefined so we curretly have to just use client side model info
120122
if (this.options.apiModelId) {
121123
let modelInfo = null
122124
if (this.options.apiModelId.startsWith("pearai")) {

src/api/providers/pearai/pearaiGeneric.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export class PearAIGenericHandler extends BaseProvider implements SingleCompleti
3838
constructor(options: OpenAiHandlerOptions) {
3939
super()
4040
this.options = options
41+
console.dir("Model ID")
42+
console.dir(this.options.openAiModelId)
4143

4244
const baseURL = this.options.openAiBaseUrl ?? "https://api.openai.com/v1"
4345
const apiKey = this.options.openAiApiKey ?? "not-provided"

src/services/mcp/McpHub.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ export class McpHub {
359359

360360
// Validate the config using McpSettingsSchema
361361
const result = McpSettingsSchema.safeParse(config)
362-
console.log("IM HERE 10101", result)
363362
if (result.success) {
364363
await this.updateServerConnections(result.data.mcpServers || {})
365364
} else {

webview-ui/src/components/chat/TaskHeader.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,22 +251,18 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
251251
display: "flex",
252252
alignItems: "center",
253253
}}>
254-
<div
255-
style={{
256-
width: 30,
257-
height: "1.2em",
258-
background:
259-
"linear-gradient(to right, transparent, var(--vscode-badge-background))",
260-
}}
261-
/>
262254
<div
263255
style={{
264256
cursor: "pointer",
265-
color: "var(--vscode-badge-foreground)",
257+
color: "var(--vscode-foreground)",
266258
fontSize: "11px",
267-
paddingRight: 8,
268-
paddingLeft: 4,
259+
padding: "2px 8px",
269260
backgroundColor: "var(--vscode-badge-background)",
261+
borderRadius: "3px",
262+
border: "1px solid var(--vscode-button-secondaryBackground)",
263+
display: "flex",
264+
alignItems: "center",
265+
height: "18px",
270266
}}
271267
onClick={() => setIsTextExpanded(!isTextExpanded)}>
272268
{t("chat:task.seeMore")}
@@ -278,11 +274,17 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
278274
<div
279275
style={{
280276
cursor: "pointer",
281-
color: "var(--vscode-badge-foreground)",
277+
color: "var(--vscode-foreground)",
282278
fontSize: "11px",
283279
marginLeft: "auto",
284-
textAlign: "right",
285-
paddingRight: 8,
280+
padding: "2px 8px",
281+
backgroundColor: "var(--vscode-badge-background)",
282+
borderRadius: "3px",
283+
border: "1px solid var(--vscode-button-secondaryBackground)",
284+
display: "inline-flex",
285+
alignItems: "center",
286+
height: "18px",
287+
width: "fit-content",
286288
}}
287289
onClick={() => setIsTextExpanded(!isTextExpanded)}>
288290
{t("chat:task.seeLess")}

0 commit comments

Comments
 (0)