Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/types/src/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const commandIds = [
"acceptInput",
"focusPanel",
"toggleAutoApprove",
"increaseFontSize",
"decreaseFontSize",
] as const

export type CommandId = (typeof commandIds)[number]
Expand Down
15 changes: 14 additions & 1 deletion src/activate/registerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { handleNewTask } from "./handleTask"
import { CodeIndexManager } from "../services/code-index/manager"
import { importSettingsWithFeedback } from "../core/config/importExport"
import { MdmService } from "../services/mdm/MdmService"
import { t } from "../i18n"

/**
* Helper to get the visible ClineProvider instance or log if not found.
Expand Down Expand Up @@ -233,6 +232,20 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
action: "toggleAutoApprove",
})
},
increaseFontSize: async () => {
const config = vscode.workspace.getConfiguration(Package.name)
const currentMultiplier = config.get<number>("fontSizeMultiplier") || 1.0
const newMultiplier = Math.min(Math.round((currentMultiplier + 0.1) * 10) / 10, 3.0)

await config.update("fontSizeMultiplier", newMultiplier, vscode.ConfigurationTarget.Global)
},
decreaseFontSize: async () => {
const config = vscode.workspace.getConfiguration(Package.name)
const currentMultiplier = config.get<number>("fontSizeMultiplier") || 1.0
const newMultiplier = Math.max(Math.round((currentMultiplier - 0.1) * 10) / 10, 0.5)

await config.update("fontSizeMultiplier", newMultiplier, vscode.ConfigurationTarget.Global)
},
})

export const openClineInNewTab = async ({ context, outputChannel }: Omit<RegisterCommandOptions, "provider">) => {
Expand Down
16 changes: 16 additions & 0 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,15 @@ export class ClineProvider
// Sends latest theme name to webview
await this.postMessageToWebview({ type: "theme", text: JSON.stringify(await getTheme()) })
}
if (e && e.affectsConfiguration(`${Package.name}.fontSizeMultiplier`)) {
const fontSizeMultiplier =
vscode.workspace.getConfiguration(Package.name).get<number>("fontSizeMultiplier") || 1.0
await this.postMessageToWebview({
type: "action",
action: "fontSizeChanged",
fontSizeMultiplier,
})
}
})
this.webviewDisposables.push(configDisposable)

Expand Down Expand Up @@ -1817,6 +1826,10 @@ export class ClineProvider
featureRoomoteControlEnabled,
} = await this.getState()

// Get font size multiplier from VSCode settings
const fontSizeMultiplier =
vscode.workspace.getConfiguration(Package.name).get<number>("fontSizeMultiplier") || 1.0

let cloudOrganizations: CloudOrganizationMembership[] = []

try {
Expand Down Expand Up @@ -1964,6 +1977,7 @@ export class ClineProvider
openRouterImageGenerationSelectedModel,
openRouterUseMiddleOutTransform,
featureRoomoteControlEnabled,
fontSizeMultiplier,
}
}

Expand Down Expand Up @@ -2195,6 +2209,8 @@ export class ClineProvider
return false
}
})(),
fontSizeMultiplier:
vscode.workspace.getConfiguration(Package.name).get<number>("fontSizeMultiplier") || 1.0,
}
}

Expand Down
1 change: 1 addition & 0 deletions src/core/webview/__tests__/ClineProvider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ describe("ClineProvider", () => {
remoteControlEnabled: false,
taskSyncEnabled: false,
featureRoomoteControlEnabled: false,
fontSizeMultiplier: 1,
}

const message: ExtensionMessage = {
Expand Down
17 changes: 17 additions & 0 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@
"command": "roo-cline.toggleAutoApprove",
"title": "%command.toggleAutoApprove.title%",
"category": "%configuration.title%"
},
{
"command": "roo-cline.increaseFontSize",
"title": "%command.increaseFontSize.title%",
"category": "%configuration.title%"
},
{
"command": "roo-cline.decreaseFontSize",
"title": "%command.decreaseFontSize.title%",
"category": "%configuration.title%"
}
],
"menus": {
Expand Down Expand Up @@ -429,6 +439,13 @@
"minimum": 1,
"maximum": 200,
"description": "%settings.codeIndex.embeddingBatchSize.description%"
},
"roo-cline.fontSizeMultiplier": {
"type": "number",
"default": 1,
"minimum": 0.5,
"maximum": 3,
"description": "%settings.fontSizeMultiplier.description%"
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/package.nls.ca.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.de.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.es.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.fr.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.hi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.id.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.it.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/package.nls.ja.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading