Skip to content

Commit ea2408f

Browse files
Address roomote feedback and remove console log statement that were added for debugging
1 parent 3867b84 commit ea2408f

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

src/services/code-index/embedders/watsonx.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ export class WatsonxEmbedder implements IEmbedder {
168168
console.warn(`No embedding results for text at index ${textIndex}`)
169169
const expectedDimension = this.getExpectedDimension(modelToUse)
170170
if (expectedDimension > 0) {
171-
console.log(`Creating fallback embedding with dimension ${expectedDimension}`)
172171
const fallbackEmbedding = new Array(expectedDimension).fill(0.0001)
173172
return { index: textIndex, embedding: fallbackEmbedding, tokens: 0 }
174173
} else {
@@ -278,8 +277,6 @@ export class WatsonxEmbedder implements IEmbedder {
278277
*/
279278
async getAvailableModels(): Promise<Record<string, { dimension: number }>> {
280279
try {
281-
console.log("Fetching available IBM watsonx embedding models...")
282-
283280
const knownModels: Record<string, { dimension: number }> = {
284281
"ibm/slate-125m-english-rtrvr-v2": { dimension: 768 },
285282
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
339339
}
340340
} else if (event.data.type === "embeddedWatsonxModels" && event.data.embeddedWatsonxModels) {
341341
try {
342-
console.log("Received IBM Embeded watsonx models:", event.data.embeddedWatsonxModels)
343342
let embeddedWatsonxModels: Record<string, { dimension: number }> = {}
344343
if (
345344
!event.data.embeddedWatsonxModels ||
@@ -352,7 +351,6 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
352351
}
353352
if (codebaseIndexModels) {
354353
codebaseIndexModels.watsonx = { ...embeddedWatsonxModels }
355-
console.log("Updated watsonx models in context:", codebaseIndexModels.watsonx)
356354
}
357355
setCurrentSettings((prev) => ({ ...prev }))
358356
} catch (error) {

webview-ui/src/components/settings/providers/WatsonxAI.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -113,26 +113,19 @@ export const WatsonxAI = ({
113113
useEffect(() => {
114114
const handleMessage = (event: MessageEvent<ExtensionMessage>) => {
115115
const message = event.data
116-
console.log("Received message:", message.type, message)
117-
118116
if (message.type === "singleRouterModelFetchResponse" && !message.success) {
119117
const providerName = message.values?.provider as RouterName
120118
if (providerName === "watsonx") {
121-
console.log("Received error response for watsonx:", message.error)
122119
watsonxErrorJustReceived.current = true
123120
setRefreshStatus("error")
124121
setRefreshError(message.error)
125122
}
126123
} else if (message.type === "watsonxModels") {
127-
console.log("Received watsonxModels:", message.watsonxModels)
128124
setWatsonxModels(message.watsonxModels ?? {})
129125
if (refreshStatus === "loading") {
130126
if (!watsonxErrorJustReceived.current) {
131-
console.log("Setting refresh status to success")
132127
setRefreshStatus("success")
133128
} else {
134-
// Reset the flag after handling the error
135-
console.log("Resetting error flag")
136129
watsonxErrorJustReceived.current = false
137130
}
138131
}
@@ -154,7 +147,6 @@ export const WatsonxAI = ({
154147
)
155148

156149
const handleRefreshModels = useCallback(() => {
157-
console.log("Refresh models clicked")
158150
setRefreshStatus("loading")
159151
setRefreshError(undefined)
160152
watsonxErrorJustReceived.current = false
@@ -173,17 +165,6 @@ export const WatsonxAI = ({
173165
baseUrl = apiConfiguration.watsonxBaseUrl || ""
174166
}
175167

176-
console.log("Refresh models config:", {
177-
platform,
178-
baseUrl,
179-
hasApiKey: !!apiKey,
180-
hasUsername: !!username,
181-
authType,
182-
hasPassword: !!password,
183-
hasProjectId: !!projectId,
184-
selectedRegion,
185-
})
186-
187168
if (platform === "ibmCloud" && (!apiKey || !baseUrl)) {
188169
setRefreshStatus("error")
189170
setRefreshError(t("settings:providers.refreshModels.missingConfig"))
@@ -216,7 +197,6 @@ export const WatsonxAI = ({
216197
}
217198
}
218199

219-
console.log("Sending requestWatsonxModels message")
220200
vscode.postMessage({
221201
type: "requestWatsonxModels",
222202
values: {
@@ -389,7 +369,6 @@ export const WatsonxAI = ({
389369
<Button
390370
variant="outline"
391371
onClick={() => {
392-
console.log("Refresh button clicked")
393372
handleRefreshModels()
394373
}}
395374
disabled={

0 commit comments

Comments
 (0)