Skip to content

Commit 61b108f

Browse files
committed
feat: enhance LM Studio provider with debug reasoning display option
- Implemented a conditional check to display reasoning output in the UI when debug thoughts are enabled. - Updated localization files to include new settings for showing debug thoughts in multiple languages. - This feature allows users to view model reasoning output, enhancing transparency and debugging capabilities.
1 parent eb1d46e commit 61b108f

File tree

17 files changed

+42
-6
lines changed

17 files changed

+42
-6
lines changed

src/api/providers/lm-studio.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,18 @@ export class LmStudioHandler extends BaseProvider implements SingleCompletionHan
119119
}
120120
}
121121

122-
if ("reasoning" in delta && delta.reasoning && typeof delta.reasoning === "string") {
122+
// This is a hack to show the debug reasoning in the UI.
123+
if (
124+
this.options.lmStudioShowDebugThoughts === true &&
125+
"reasoning" in delta &&
126+
delta.reasoning &&
127+
typeof delta.reasoning === "string"
128+
) {
123129
const reasoning = delta.reasoning
124130
assistantText += reasoning
125-
if (this.options.lmStudioShowDebugThoughts === true) {
126-
yield {
127-
type: "reasoning",
128-
text: reasoning,
129-
}
131+
yield {
132+
type: "reasoning",
133+
text: reasoning,
130134
}
131135
}
132136
}

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/es/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ja/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ko/settings.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)