Compare commits

...
5 changed files with 23 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix edge case of changing language in settings
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "claude-dev",
"version": "3.16.0",
"version": "3.16.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "claude-dev",
"version": "3.16.0",
"version": "3.16.1",
"license": "Apache-2.0",
"dependencies": {
"@anthropic-ai/bedrock-sdk": "^0.12.4",
+12
View File
@@ -14,6 +14,8 @@ import { Controller } from "./core/controller"
import { ErrorService } from "./services/error/ErrorService"
import { initializeTestMode, cleanupTestMode } from "./services/test/TestMode"
import { telemetryService } from "./services/posthog/telemetry/TelemetryService"
// テレメトリサービスをインポート
import { telemetryService as clineTelemetryService } from "./services/posthog/telemetry/TelemetryService"
/*
Built using https://github.com/microsoft/vscode-webview-ui-toolkit
@@ -310,6 +312,8 @@ export async function activate(context: vscode.ExtensionContext) {
languageId,
Array.isArray(diagnostics) ? diagnostics : undefined,
)
const taskId = visibleWebview?.controller.task?.taskId // Corrected to use .task?.taskId
clineTelemetryService.captureButtonClick("codeAction_addToChat", taskId) // taskId added
}),
)
@@ -481,6 +485,8 @@ export async function activate(context: vscode.ExtensionContext) {
// Send to sidebar provider with diagnostics
const visibleWebview = WebviewProvider.getVisibleInstance()
await visibleWebview?.controller.fixWithCline(selectedText, filePath, languageId, diagnostics)
const taskId = visibleWebview?.controller.task?.taskId
clineTelemetryService.captureButtonClick("codeAction_fixWithCline", taskId) // taskId added
}),
)
@@ -502,6 +508,8 @@ export async function activate(context: vscode.ExtensionContext) {
const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath
const prompt = `Explain the following code from ${fileMention}:\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\``
await visibleWebview?.controller.initTask(prompt)
const taskId = visibleWebview?.controller.task?.taskId
clineTelemetryService.captureButtonClick("codeAction_explainCode", taskId) // taskId added
}),
)
@@ -523,6 +531,8 @@ export async function activate(context: vscode.ExtensionContext) {
const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath
const prompt = `Improve the following code from ${fileMention} (e.g., suggest refactorings, optimizations, or better practices):\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\``
await visibleWebview?.controller.initTask(prompt)
const taskId = visibleWebview?.controller.task?.taskId
clineTelemetryService.captureButtonClick("codeAction_improveCode", taskId) // taskId added
}),
)
@@ -584,6 +594,8 @@ export async function activate(context: vscode.ExtensionContext) {
"Could not activate Cline view. Please try opening it manually from the Activity Bar.",
)
}
const taskId = activeWebviewProvider?.controller.task?.taskId
clineTelemetryService.captureButtonClick("command_focusChatInput", taskId)
}),
)
@@ -970,6 +970,8 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
type: "togglePlanActMode",
chatSettings: {
mode: newMode,
preferredLanguage: chatSettings.preferredLanguage,
openAIReasoningEffort: chatSettings.openAIReasoningEffort,
},
chatContent: {
message: inputValue.trim() ? inputValue : undefined,
@@ -119,6 +119,8 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
type: "togglePlanActMode",
chatSettings: {
mode: pendingTabChange,
preferredLanguage: chatSettings.preferredLanguage,
openAIReasoningEffort: chatSettings.openAIReasoningEffort,
},
})
setPendingTabChange(null)