mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Updating Roo-Cline with the latest cline/cline (11/22)
This commit is contained in:
@@ -1,31 +1,25 @@
|
|||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 6,
|
"ecmaVersion": 6,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["@typescript-eslint"],
|
||||||
"@typescript-eslint"
|
"rules": {
|
||||||
],
|
"@typescript-eslint/naming-convention": [
|
||||||
"rules": {
|
"warn",
|
||||||
"@typescript-eslint/naming-convention": [
|
{
|
||||||
"warn",
|
"selector": "import",
|
||||||
{
|
"format": ["camelCase", "PascalCase"]
|
||||||
"selector": "import",
|
}
|
||||||
"format": [ "camelCase", "PascalCase" ]
|
],
|
||||||
}
|
"@typescript-eslint/semi": "off",
|
||||||
],
|
"curly": "warn",
|
||||||
"@typescript-eslint/semi": "off",
|
"eqeqeq": "warn",
|
||||||
"curly": "warn",
|
"no-throw-literal": "warn",
|
||||||
"eqeqeq": "warn",
|
"semi": "off",
|
||||||
"no-throw-literal": "warn",
|
"react-hooks/exhaustive-deps": "off"
|
||||||
"semi": "off",
|
},
|
||||||
"react-hooks/exhaustive-deps": "off"
|
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
|
||||||
},
|
|
||||||
"ignorePatterns": [
|
|
||||||
"out",
|
|
||||||
"dist",
|
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
@@ -2,3 +2,4 @@ dist/
|
|||||||
node_modules
|
node_modules
|
||||||
webview-ui/build/
|
webview-ui/build/
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
|
package-lock.json
|
||||||
@@ -3,5 +3,5 @@
|
|||||||
"useTabs": true,
|
"useTabs": true,
|
||||||
"printWidth": 120,
|
"printWidth": 120,
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"jsxBracketSameLine": true
|
"bracketSameLine": true
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from '@vscode/test-cli';
|
import { defineConfig } from "@vscode/test-cli"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
files: 'out/test/**/*.test.js',
|
files: "out/test/**/*.test.js",
|
||||||
});
|
})
|
||||||
|
|||||||
10
.vscode/extensions.json
vendored
10
.vscode/extensions.json
vendored
@@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": ["dbaeumer.vscode-eslint", "connor4312.esbuild-problem-matchers", "ms-vscode.extension-test-runner"]
|
"recommendations": [
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"connor4312.esbuild-problem-matchers",
|
||||||
|
"ms-vscode.extension-test-runner"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
@@ -9,12 +9,8 @@
|
|||||||
"name": "Run Extension",
|
"name": "Run Extension",
|
||||||
"type": "extensionHost",
|
"type": "extensionHost",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [
|
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
|
||||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
||||||
],
|
|
||||||
"outFiles": [
|
|
||||||
"${workspaceFolder}/dist/**/*.js"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "${defaultBuildTask}"
|
"preLaunchTask": "${defaultBuildTask}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
20
.vscode/settings.json
vendored
20
.vscode/settings.json
vendored
@@ -1,13 +1,13 @@
|
|||||||
// Place your settings in this file to overwrite default and user settings.
|
// Place your settings in this file to overwrite default and user settings.
|
||||||
{
|
{
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"out": false, // set this to true to hide the "out" folder with the compiled JS files
|
"out": false, // set this to true to hide the "out" folder with the compiled JS files
|
||||||
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
|
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
|
||||||
},
|
},
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"out": true, // set this to false to include "out" folder in search results
|
"out": true, // set this to false to include "out" folder in search results
|
||||||
"dist": true // set this to false to include "dist" folder in search results
|
"dist": true // set this to false to include "dist" folder in search results
|
||||||
},
|
},
|
||||||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
||||||
"typescript.tsc.autoDetect": "off"
|
"typescript.tsc.autoDetect": "off"
|
||||||
}
|
}
|
||||||
99
.vscode/tasks.json
vendored
99
.vscode/tasks.json
vendored
@@ -4,56 +4,52 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "watch",
|
"label": "watch",
|
||||||
"dependsOn": [
|
"dependsOn": ["npm: build:webview", "npm: watch:tsc", "npm: watch:esbuild"],
|
||||||
"npm: build:webview",
|
"presentation": {
|
||||||
"npm: watch:tsc",
|
"reveal": "never"
|
||||||
"npm: watch:esbuild"
|
},
|
||||||
],
|
"group": {
|
||||||
"presentation": {
|
"kind": "build",
|
||||||
"reveal": "never"
|
"isDefault": true
|
||||||
},
|
}
|
||||||
"group": {
|
},
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "npm",
|
|
||||||
"script": "build:webview",
|
|
||||||
"group": "build",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"isBackground": true,
|
|
||||||
"label": "npm: build:webview",
|
|
||||||
"presentation": {
|
|
||||||
"group": "watch",
|
|
||||||
"reveal": "never"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "npm",
|
|
||||||
"script": "watch:esbuild",
|
|
||||||
"group": "build",
|
|
||||||
"problemMatcher": "$esbuild-watch",
|
|
||||||
"isBackground": true,
|
|
||||||
"label": "npm: watch:esbuild",
|
|
||||||
"presentation": {
|
|
||||||
"group": "watch",
|
|
||||||
"reveal": "never"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch:tsc",
|
"script": "build:webview",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"problemMatcher": "$tsc-watch",
|
"problemMatcher": [],
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"label": "npm: watch:tsc",
|
"label": "npm: build:webview",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "watch",
|
"group": "watch",
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "watch:esbuild",
|
||||||
|
"group": "build",
|
||||||
|
"problemMatcher": "$esbuild-watch",
|
||||||
|
"isBackground": true,
|
||||||
|
"label": "npm: watch:esbuild",
|
||||||
|
"presentation": {
|
||||||
|
"group": "watch",
|
||||||
|
"reveal": "never"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "watch:tsc",
|
||||||
|
"group": "build",
|
||||||
|
"problemMatcher": "$tsc-watch",
|
||||||
|
"isBackground": true,
|
||||||
|
"label": "npm: watch:tsc",
|
||||||
|
"presentation": {
|
||||||
|
"group": "watch",
|
||||||
|
"reveal": "never"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch-tests",
|
"script": "watch-tests",
|
||||||
@@ -67,10 +63,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "tasks: watch-tests",
|
"label": "tasks: watch-tests",
|
||||||
"dependsOn": [
|
"dependsOn": ["npm: watch", "npm: watch-tests"],
|
||||||
"npm: watch",
|
|
||||||
"npm: watch-tests"
|
|
||||||
],
|
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
|
|||||||
"name": "roo-cline",
|
"name": "roo-cline",
|
||||||
"displayName": "Roo Cline",
|
"displayName": "Roo Cline",
|
||||||
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
|
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
|
||||||
"version": "2.0.3",
|
"version": "2.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"bin/roo-cline-2.0.3.vsix",
|
"bin/roo-cline-2.0.3.vsix",
|
||||||
"assets/icons/icon_Roo.png"
|
"assets/icons/icon_Roo.png"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export class AnthropicHandler implements ApiHandler {
|
|||||||
*/
|
*/
|
||||||
const userMsgIndices = messages.reduce(
|
const userMsgIndices = messages.reduce(
|
||||||
(acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc),
|
(acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc),
|
||||||
[] as number[]
|
[] as number[],
|
||||||
)
|
)
|
||||||
const lastUserMsgIndex = userMsgIndices[userMsgIndices.length - 1] ?? -1
|
const lastUserMsgIndex = userMsgIndices[userMsgIndices.length - 1] ?? -1
|
||||||
const secondLastMsgUserIndex = userMsgIndices[userMsgIndices.length - 2] ?? -1
|
const secondLastMsgUserIndex = userMsgIndices[userMsgIndices.length - 2] ?? -1
|
||||||
@@ -58,12 +58,12 @@ export class AnthropicHandler implements ApiHandler {
|
|||||||
text: message.content,
|
text: message.content,
|
||||||
cache_control: { type: "ephemeral" },
|
cache_control: { type: "ephemeral" },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: message.content.map((content, contentIndex) =>
|
: message.content.map((content, contentIndex) =>
|
||||||
contentIndex === message.content.length - 1
|
contentIndex === message.content.length - 1
|
||||||
? { ...content, cache_control: { type: "ephemeral" } }
|
? { ...content, cache_control: { type: "ephemeral" } }
|
||||||
: content
|
: content,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return message
|
return message
|
||||||
@@ -88,7 +88,7 @@ export class AnthropicHandler implements ApiHandler {
|
|||||||
default:
|
default:
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
})()
|
})(),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export class LmStudioHandler implements ApiHandler {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// LM Studio doesn't return an error code/body for now
|
// LM Studio doesn't return an error code/body for now
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Please check the LM Studio developer logs to debug what went wrong. You may need to load the model with a larger context length to work with Cline's prompts."
|
"Please check the LM Studio developer logs to debug what went wrong. You may need to load the model with a larger context length to work with Cline's prompts.",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function convertAnthropicContentToGemini(
|
|||||||
| Anthropic.Messages.ImageBlockParam
|
| Anthropic.Messages.ImageBlockParam
|
||||||
| Anthropic.Messages.ToolUseBlockParam
|
| Anthropic.Messages.ToolUseBlockParam
|
||||||
| Anthropic.Messages.ToolResultBlockParam
|
| Anthropic.Messages.ToolResultBlockParam
|
||||||
>
|
>,
|
||||||
): Part[] {
|
): Part[] {
|
||||||
if (typeof content === "string") {
|
if (typeof content === "string") {
|
||||||
return [{ text: content } as TextPart]
|
return [{ text: content } as TextPart]
|
||||||
@@ -83,7 +83,7 @@ export function convertAnthropicContentToGemini(
|
|||||||
data: part.source.data,
|
data: part.source.data,
|
||||||
mimeType: part.source.media_type,
|
mimeType: part.source.media_type,
|
||||||
},
|
},
|
||||||
} as InlineDataPart)
|
}) as InlineDataPart,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ export function convertAnthropicToolToGemini(tool: Anthropic.Messages.Tool): Fun
|
|||||||
type: (value as any).type.toUpperCase(),
|
type: (value as any).type.toUpperCase(),
|
||||||
description: (value as any).description || "",
|
description: (value as any).description || "",
|
||||||
},
|
},
|
||||||
])
|
]),
|
||||||
),
|
),
|
||||||
required: (tool.input_schema.required as string[]) || [],
|
required: (tool.input_schema.required as string[]) || [],
|
||||||
},
|
},
|
||||||
@@ -133,7 +133,7 @@ export function unescapeGeminiContent(content: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function convertGeminiResponseToAnthropic(
|
export function convertGeminiResponseToAnthropic(
|
||||||
response: EnhancedGenerateContentResponse
|
response: EnhancedGenerateContentResponse,
|
||||||
): Anthropic.Messages.Message {
|
): Anthropic.Messages.Message {
|
||||||
const content: Anthropic.Messages.ContentBlock[] = []
|
const content: Anthropic.Messages.ContentBlock[] = []
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ I've analyzed the project structure, but I need more information to proceed. Let
|
|||||||
|
|
||||||
export function convertToO1Messages(
|
export function convertToO1Messages(
|
||||||
openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[],
|
openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[],
|
||||||
systemPrompt: string
|
systemPrompt: string,
|
||||||
): OpenAI.Chat.ChatCompletionMessageParam[] {
|
): OpenAI.Chat.ChatCompletionMessageParam[] {
|
||||||
const toolsReplaced = openAiMessages.reduce((acc, message) => {
|
const toolsReplaced = openAiMessages.reduce((acc, message) => {
|
||||||
if (message.role === "tool") {
|
if (message.role === "tool") {
|
||||||
@@ -360,7 +360,7 @@ function validateToolInput(toolName: string, tool_input: Record<string, string>)
|
|||||||
|
|
||||||
// Convert OpenAI response to Anthropic format
|
// Convert OpenAI response to Anthropic format
|
||||||
export function convertO1ResponseToAnthropicMessage(
|
export function convertO1ResponseToAnthropicMessage(
|
||||||
completion: OpenAI.Chat.Completions.ChatCompletion
|
completion: OpenAI.Chat.Completions.ChatCompletion,
|
||||||
): Anthropic.Messages.Message {
|
): Anthropic.Messages.Message {
|
||||||
const openAiMessage = completion.choices[0].message
|
const openAiMessage = completion.choices[0].message
|
||||||
const { normalText, toolCalls } = parseAIResponse(openAiMessage.content || "")
|
const { normalText, toolCalls } = parseAIResponse(openAiMessage.content || "")
|
||||||
@@ -405,7 +405,7 @@ export function convertO1ResponseToAnthropicMessage(
|
|||||||
name: toolCall.tool,
|
name: toolCall.tool,
|
||||||
input: toolCall.tool_input,
|
input: toolCall.tool_input,
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Anthropic } from "@anthropic-ai/sdk"
|
|||||||
import OpenAI from "openai"
|
import OpenAI from "openai"
|
||||||
|
|
||||||
export function convertToOpenAiMessages(
|
export function convertToOpenAiMessages(
|
||||||
anthropicMessages: Anthropic.Messages.MessageParam[]
|
anthropicMessages: Anthropic.Messages.MessageParam[],
|
||||||
): OpenAI.Chat.ChatCompletionMessageParam[] {
|
): OpenAI.Chat.ChatCompletionMessageParam[] {
|
||||||
const openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = []
|
const openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = []
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ export function convertToOpenAiMessages(
|
|||||||
} // user cannot send tool_use messages
|
} // user cannot send tool_use messages
|
||||||
return acc
|
return acc
|
||||||
},
|
},
|
||||||
{ nonToolMessages: [], toolMessages: [] }
|
{ nonToolMessages: [], toolMessages: [] },
|
||||||
)
|
)
|
||||||
|
|
||||||
// Process tool result messages FIRST since they must follow the tool use messages
|
// Process tool result messages FIRST since they must follow the tool use messages
|
||||||
@@ -105,7 +105,7 @@ export function convertToOpenAiMessages(
|
|||||||
} // assistant cannot send tool_result messages
|
} // assistant cannot send tool_result messages
|
||||||
return acc
|
return acc
|
||||||
},
|
},
|
||||||
{ nonToolMessages: [], toolMessages: [] }
|
{ nonToolMessages: [], toolMessages: [] },
|
||||||
)
|
)
|
||||||
|
|
||||||
// Process non-tool messages
|
// Process non-tool messages
|
||||||
@@ -147,7 +147,7 @@ export function convertToOpenAiMessages(
|
|||||||
|
|
||||||
// Convert OpenAI response to Anthropic format
|
// Convert OpenAI response to Anthropic format
|
||||||
export function convertToAnthropicMessage(
|
export function convertToAnthropicMessage(
|
||||||
completion: OpenAI.Chat.Completions.ChatCompletion
|
completion: OpenAI.Chat.Completions.ChatCompletion,
|
||||||
): Anthropic.Messages.Message {
|
): Anthropic.Messages.Message {
|
||||||
const openAiMessage = completion.choices[0].message
|
const openAiMessage = completion.choices[0].message
|
||||||
const anthropicMessage: Anthropic.Messages.Message = {
|
const anthropicMessage: Anthropic.Messages.Message = {
|
||||||
@@ -196,7 +196,7 @@ export function convertToAnthropicMessage(
|
|||||||
name: toolCall.function.name,
|
name: toolCall.function.name,
|
||||||
input: parsedInput,
|
input: parsedInput,
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return anthropicMessage
|
return anthropicMessage
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export class Cline {
|
|||||||
alwaysAllowBrowser?: boolean,
|
alwaysAllowBrowser?: boolean,
|
||||||
task?: string,
|
task?: string,
|
||||||
images?: string[],
|
images?: string[],
|
||||||
historyItem?: HistoryItem
|
historyItem?: HistoryItem,
|
||||||
) {
|
) {
|
||||||
this.providerRef = new WeakRef(provider)
|
this.providerRef = new WeakRef(provider)
|
||||||
this.api = buildApiHandler(apiConfiguration)
|
this.api = buildApiHandler(apiConfiguration)
|
||||||
@@ -235,7 +235,7 @@ export class Cline {
|
|||||||
this.clineMessages[
|
this.clineMessages[
|
||||||
findLastIndex(
|
findLastIndex(
|
||||||
this.clineMessages,
|
this.clineMessages,
|
||||||
(m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task")
|
(m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task"),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
await this.providerRef.deref()?.updateTaskHistory({
|
await this.providerRef.deref()?.updateTaskHistory({
|
||||||
@@ -259,7 +259,7 @@ export class Cline {
|
|||||||
async ask(
|
async ask(
|
||||||
type: ClineAsk,
|
type: ClineAsk,
|
||||||
text?: string,
|
text?: string,
|
||||||
partial?: boolean
|
partial?: boolean,
|
||||||
): Promise<{ response: ClineAskResponse; text?: string; images?: string[] }> {
|
): Promise<{ response: ClineAskResponse; text?: string; images?: string[] }> {
|
||||||
// If this Cline instance was aborted by the provider, then the only thing keeping us alive is a promise still running in the background, in which case we don't want to send its result to the webview as it is attached to a new instance of Cline now. So we can safely ignore the result of any active promises, and this class will be deallocated. (Although we set Cline = undefined in provider, that simply removes the reference to this instance, but the instance is still alive until this promise resolves or rejects.)
|
// If this Cline instance was aborted by the provider, then the only thing keeping us alive is a promise still running in the background, in which case we don't want to send its result to the webview as it is attached to a new instance of Cline now. So we can safely ignore the result of any active promises, and this class will be deallocated. (Although we set Cline = undefined in provider, that simply removes the reference to this instance, but the instance is still alive until this promise resolves or rejects.)
|
||||||
if (this.abort) {
|
if (this.abort) {
|
||||||
@@ -420,7 +420,7 @@ export class Cline {
|
|||||||
"error",
|
"error",
|
||||||
`Cline tried to use ${toolName}${
|
`Cline tried to use ${toolName}${
|
||||||
relPath ? ` for '${relPath.toPosix()}'` : ""
|
relPath ? ` for '${relPath.toPosix()}'` : ""
|
||||||
} without value for required parameter '${paramName}'. Retrying...`
|
} without value for required parameter '${paramName}'. Retrying...`,
|
||||||
)
|
)
|
||||||
return formatResponse.toolError(formatResponse.missingToolParameterError(paramName))
|
return formatResponse.toolError(formatResponse.missingToolParameterError(paramName))
|
||||||
}
|
}
|
||||||
@@ -452,7 +452,7 @@ export class Cline {
|
|||||||
// Remove any resume messages that may have been added before
|
// Remove any resume messages that may have been added before
|
||||||
const lastRelevantMessageIndex = findLastIndex(
|
const lastRelevantMessageIndex = findLastIndex(
|
||||||
modifiedClineMessages,
|
modifiedClineMessages,
|
||||||
(m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task")
|
(m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task"),
|
||||||
)
|
)
|
||||||
if (lastRelevantMessageIndex !== -1) {
|
if (lastRelevantMessageIndex !== -1) {
|
||||||
modifiedClineMessages.splice(lastRelevantMessageIndex + 1)
|
modifiedClineMessages.splice(lastRelevantMessageIndex + 1)
|
||||||
@@ -461,7 +461,7 @@ export class Cline {
|
|||||||
// since we don't use api_req_finished anymore, we need to check if the last api_req_started has a cost value, if it doesn't and no cancellation reason to present, then we remove it since it indicates an api request without any partial content streamed
|
// since we don't use api_req_finished anymore, we need to check if the last api_req_started has a cost value, if it doesn't and no cancellation reason to present, then we remove it since it indicates an api request without any partial content streamed
|
||||||
const lastApiReqStartedIndex = findLastIndex(
|
const lastApiReqStartedIndex = findLastIndex(
|
||||||
modifiedClineMessages,
|
modifiedClineMessages,
|
||||||
(m) => m.type === "say" && m.say === "api_req_started"
|
(m) => m.type === "say" && m.say === "api_req_started",
|
||||||
)
|
)
|
||||||
if (lastApiReqStartedIndex !== -1) {
|
if (lastApiReqStartedIndex !== -1) {
|
||||||
const lastApiReqStarted = modifiedClineMessages[lastApiReqStartedIndex]
|
const lastApiReqStarted = modifiedClineMessages[lastApiReqStartedIndex]
|
||||||
@@ -566,7 +566,7 @@ export class Cline {
|
|||||||
|
|
||||||
if (hasToolUse) {
|
if (hasToolUse) {
|
||||||
const toolUseBlocks = content.filter(
|
const toolUseBlocks = content.filter(
|
||||||
(block) => block.type === "tool_use"
|
(block) => block.type === "tool_use",
|
||||||
) as Anthropic.Messages.ToolUseBlock[]
|
) as Anthropic.Messages.ToolUseBlock[]
|
||||||
const toolResponses: Anthropic.ToolResultBlockParam[] = toolUseBlocks.map((block) => ({
|
const toolResponses: Anthropic.ToolResultBlockParam[] = toolUseBlocks.map((block) => ({
|
||||||
type: "tool_result",
|
type: "tool_result",
|
||||||
@@ -592,17 +592,17 @@ export class Cline {
|
|||||||
: [{ type: "text", text: previousAssistantMessage.content }]
|
: [{ type: "text", text: previousAssistantMessage.content }]
|
||||||
|
|
||||||
const toolUseBlocks = assistantContent.filter(
|
const toolUseBlocks = assistantContent.filter(
|
||||||
(block) => block.type === "tool_use"
|
(block) => block.type === "tool_use",
|
||||||
) as Anthropic.Messages.ToolUseBlock[]
|
) as Anthropic.Messages.ToolUseBlock[]
|
||||||
|
|
||||||
if (toolUseBlocks.length > 0) {
|
if (toolUseBlocks.length > 0) {
|
||||||
const existingToolResults = existingUserContent.filter(
|
const existingToolResults = existingUserContent.filter(
|
||||||
(block) => block.type === "tool_result"
|
(block) => block.type === "tool_result",
|
||||||
) as Anthropic.ToolResultBlockParam[]
|
) as Anthropic.ToolResultBlockParam[]
|
||||||
|
|
||||||
const missingToolResponses: Anthropic.ToolResultBlockParam[] = toolUseBlocks
|
const missingToolResponses: Anthropic.ToolResultBlockParam[] = toolUseBlocks
|
||||||
.filter(
|
.filter(
|
||||||
(toolUse) => !existingToolResults.some((result) => result.tool_use_id === toolUse.id)
|
(toolUse) => !existingToolResults.some((result) => result.tool_use_id === toolUse.id),
|
||||||
)
|
)
|
||||||
.map((toolUse) => ({
|
.map((toolUse) => ({
|
||||||
type: "tool_result",
|
type: "tool_result",
|
||||||
@@ -772,7 +772,7 @@ export class Cline {
|
|||||||
`Command is still running in the user's terminal.${
|
`Command is still running in the user's terminal.${
|
||||||
result.length > 0 ? `\nHere's the output so far:\n${result}` : ""
|
result.length > 0 ? `\nHere's the output so far:\n${result}` : ""
|
||||||
}\n\nThe user provided the following feedback:\n<feedback>\n${userFeedback.text}\n</feedback>`,
|
}\n\nThe user provided the following feedback:\n<feedback>\n${userFeedback.text}\n</feedback>`,
|
||||||
userFeedback.images
|
userFeedback.images,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -797,7 +797,7 @@ export class Cline {
|
|||||||
const previousRequest = this.clineMessages[previousApiReqIndex]
|
const previousRequest = this.clineMessages[previousApiReqIndex]
|
||||||
if (previousRequest && previousRequest.text) {
|
if (previousRequest && previousRequest.text) {
|
||||||
const { tokensIn, tokensOut, cacheWrites, cacheReads }: ClineApiReqInfo = JSON.parse(
|
const { tokensIn, tokensOut, cacheWrites, cacheReads }: ClineApiReqInfo = JSON.parse(
|
||||||
previousRequest.text
|
previousRequest.text,
|
||||||
)
|
)
|
||||||
const totalTokens = (tokensIn || 0) + (tokensOut || 0) + (cacheWrites || 0) + (cacheReads || 0)
|
const totalTokens = (tokensIn || 0) + (tokensOut || 0) + (cacheWrites || 0) + (cacheReads || 0)
|
||||||
const contextWindow = this.api.getModel().info.contextWindow || 128_000
|
const contextWindow = this.api.getModel().info.contextWindow || 128_000
|
||||||
@@ -820,7 +820,7 @@ export class Cline {
|
|||||||
// note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely.
|
// note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely.
|
||||||
const { response } = await this.ask(
|
const { response } = await this.ask(
|
||||||
"api_req_failed",
|
"api_req_failed",
|
||||||
error.message ?? JSON.stringify(serializeError(error), null, 2)
|
error.message ?? JSON.stringify(serializeError(error), null, 2),
|
||||||
)
|
)
|
||||||
if (response !== "yesButtonClicked") {
|
if (response !== "yesButtonClicked") {
|
||||||
// this will never happen since if noButtonClicked, we will clear current task, aborting this instance
|
// this will never happen since if noButtonClicked, we will clear current task, aborting this instance
|
||||||
@@ -983,7 +983,7 @@ export class Cline {
|
|||||||
if (response === "messageResponse") {
|
if (response === "messageResponse") {
|
||||||
await this.say("user_feedback", text, images)
|
await this.say("user_feedback", text, images)
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
formatResponse.toolResult(formatResponse.toolDeniedWithFeedback(text), images)
|
formatResponse.toolResult(formatResponse.toolDeniedWithFeedback(text), images),
|
||||||
)
|
)
|
||||||
// this.userMessageContent.push({
|
// this.userMessageContent.push({
|
||||||
// type: "text",
|
// type: "text",
|
||||||
@@ -1016,7 +1016,7 @@ export class Cline {
|
|||||||
const errorString = `Error ${action}: ${JSON.stringify(serializeError(error))}`
|
const errorString = `Error ${action}: ${JSON.stringify(serializeError(error))}`
|
||||||
await this.say(
|
await this.say(
|
||||||
"error",
|
"error",
|
||||||
`Error ${action}:\n${error.message ?? JSON.stringify(serializeError(error), null, 2)}`
|
`Error ${action}:\n${error.message ?? JSON.stringify(serializeError(error), null, 2)}`,
|
||||||
)
|
)
|
||||||
// this.toolResults.push({
|
// this.toolResults.push({
|
||||||
// type: "tool_result",
|
// type: "tool_result",
|
||||||
@@ -1042,7 +1042,7 @@ export class Cline {
|
|||||||
.split("")
|
.split("")
|
||||||
.map((char) => `(?:${char})?`)
|
.map((char) => `(?:${char})?`)
|
||||||
.join("")}$`,
|
.join("")}$`,
|
||||||
"g"
|
"g",
|
||||||
)
|
)
|
||||||
return text.replace(tagRegex, "")
|
return text.replace(tagRegex, "")
|
||||||
}
|
}
|
||||||
@@ -1154,8 +1154,8 @@ export class Cline {
|
|||||||
? formatResponse.createPrettyPatch(
|
? formatResponse.createPrettyPatch(
|
||||||
relPath,
|
relPath,
|
||||||
this.diffViewProvider.originalContent,
|
this.diffViewProvider.originalContent,
|
||||||
newContent
|
newContent,
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
} satisfies ClineSayTool)
|
} satisfies ClineSayTool)
|
||||||
const didApprove = this.alwaysAllowWrite || (await askApproval("tool", completeMessage))
|
const didApprove = this.alwaysAllowWrite || (await askApproval("tool", completeMessage))
|
||||||
@@ -1173,7 +1173,7 @@ export class Cline {
|
|||||||
tool: fileExists ? "editedExistingFile" : "newFileCreated",
|
tool: fileExists ? "editedExistingFile" : "newFileCreated",
|
||||||
path: getReadablePath(cwd, relPath),
|
path: getReadablePath(cwd, relPath),
|
||||||
diff: userEdits,
|
diff: userEdits,
|
||||||
} satisfies ClineSayTool)
|
} satisfies ClineSayTool),
|
||||||
)
|
)
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
`The user made the following updates to your content:\n\n${userEdits}\n\n` +
|
`The user made the following updates to your content:\n\n${userEdits}\n\n` +
|
||||||
@@ -1183,11 +1183,11 @@ export class Cline {
|
|||||||
`1. You do not need to re-write the file with these changes, as they have already been applied.\n` +
|
`1. You do not need to re-write the file with these changes, as they have already been applied.\n` +
|
||||||
`2. Proceed with the task using this updated file content as the new baseline.\n` +
|
`2. Proceed with the task using this updated file content as the new baseline.\n` +
|
||||||
`3. If the user's edits have addressed part of the task or changed the requirements, adjust your approach accordingly.` +
|
`3. If the user's edits have addressed part of the task or changed the requirements, adjust your approach accordingly.` +
|
||||||
`${newProblemsMessage}`
|
`${newProblemsMessage}`,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
`The content was successfully saved to ${relPath.toPosix()}.${newProblemsMessage}`
|
`The content was successfully saved to ${relPath.toPosix()}.${newProblemsMessage}`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
await this.diffViewProvider.reset()
|
await this.diffViewProvider.reset()
|
||||||
@@ -1319,7 +1319,7 @@ export class Cline {
|
|||||||
if (!relDirPath) {
|
if (!relDirPath) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("list_code_definition_names", "path")
|
await this.sayAndCreateMissingParamError("list_code_definition_names", "path"),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1448,7 +1448,7 @@ export class Cline {
|
|||||||
text: removeClosingTag("text", text),
|
text: removeClosingTag("text", text),
|
||||||
} satisfies ClineSayBrowserAction),
|
} satisfies ClineSayBrowserAction),
|
||||||
undefined,
|
undefined,
|
||||||
block.partial
|
block.partial,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -1458,7 +1458,7 @@ export class Cline {
|
|||||||
if (!url) {
|
if (!url) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("browser_action", "url")
|
await this.sayAndCreateMissingParamError("browser_action", "url"),
|
||||||
)
|
)
|
||||||
await this.browserSession.closeBrowser()
|
await this.browserSession.closeBrowser()
|
||||||
break
|
break
|
||||||
@@ -1480,7 +1480,10 @@ export class Cline {
|
|||||||
if (!coordinate) {
|
if (!coordinate) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("browser_action", "coordinate")
|
await this.sayAndCreateMissingParamError(
|
||||||
|
"browser_action",
|
||||||
|
"coordinate",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
await this.browserSession.closeBrowser()
|
await this.browserSession.closeBrowser()
|
||||||
break // can't be within an inner switch
|
break // can't be within an inner switch
|
||||||
@@ -1490,7 +1493,7 @@ export class Cline {
|
|||||||
if (!text) {
|
if (!text) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("browser_action", "text")
|
await this.sayAndCreateMissingParamError("browser_action", "text"),
|
||||||
)
|
)
|
||||||
await this.browserSession.closeBrowser()
|
await this.browserSession.closeBrowser()
|
||||||
break
|
break
|
||||||
@@ -1505,7 +1508,7 @@ export class Cline {
|
|||||||
text,
|
text,
|
||||||
} satisfies ClineSayBrowserAction),
|
} satisfies ClineSayBrowserAction),
|
||||||
undefined,
|
undefined,
|
||||||
false
|
false,
|
||||||
)
|
)
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "click":
|
case "click":
|
||||||
@@ -1538,15 +1541,15 @@ export class Cline {
|
|||||||
`The browser action has been executed. The console logs and screenshot have been captured for your analysis.\n\nConsole logs:\n${
|
`The browser action has been executed. The console logs and screenshot have been captured for your analysis.\n\nConsole logs:\n${
|
||||||
browserActionResult.logs || "(No new logs)"
|
browserActionResult.logs || "(No new logs)"
|
||||||
}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser. For example, if after analyzing the logs and screenshot you need to edit a file, you must first close the browser before you can use the write_to_file tool.)`,
|
}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser. For example, if after analyzing the logs and screenshot you need to edit a file, you must first close the browser before you can use the write_to_file tool.)`,
|
||||||
browserActionResult.screenshot ? [browserActionResult.screenshot] : []
|
browserActionResult.screenshot ? [browserActionResult.screenshot] : [],
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
case "close":
|
case "close":
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
formatResponse.toolResult(
|
formatResponse.toolResult(
|
||||||
`The browser has been closed. You may now proceed to using other tools.`
|
`The browser has been closed. You may now proceed to using other tools.`,
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1574,7 +1577,7 @@ export class Cline {
|
|||||||
if (!command) {
|
if (!command) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("execute_command", "command")
|
await this.sayAndCreateMissingParamError("execute_command", "command"),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1603,14 +1606,14 @@ export class Cline {
|
|||||||
try {
|
try {
|
||||||
if (block.partial) {
|
if (block.partial) {
|
||||||
await this.ask("followup", removeClosingTag("question", question), block.partial).catch(
|
await this.ask("followup", removeClosingTag("question", question), block.partial).catch(
|
||||||
() => {}
|
() => {},
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
if (!question) {
|
if (!question) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("ask_followup_question", "question")
|
await this.sayAndCreateMissingParamError("ask_followup_question", "question"),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1661,7 +1664,7 @@ export class Cline {
|
|||||||
await this.ask(
|
await this.ask(
|
||||||
"command",
|
"command",
|
||||||
removeClosingTag("command", command),
|
removeClosingTag("command", command),
|
||||||
block.partial
|
block.partial,
|
||||||
).catch(() => {})
|
).catch(() => {})
|
||||||
} else {
|
} else {
|
||||||
// last message is completion_result
|
// last message is completion_result
|
||||||
@@ -1670,12 +1673,12 @@ export class Cline {
|
|||||||
"completion_result",
|
"completion_result",
|
||||||
removeClosingTag("result", result),
|
removeClosingTag("result", result),
|
||||||
undefined,
|
undefined,
|
||||||
false
|
false,
|
||||||
)
|
)
|
||||||
await this.ask(
|
await this.ask(
|
||||||
"command",
|
"command",
|
||||||
removeClosingTag("command", command),
|
removeClosingTag("command", command),
|
||||||
block.partial
|
block.partial,
|
||||||
).catch(() => {})
|
).catch(() => {})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1684,7 +1687,7 @@ export class Cline {
|
|||||||
"completion_result",
|
"completion_result",
|
||||||
removeClosingTag("result", result),
|
removeClosingTag("result", result),
|
||||||
undefined,
|
undefined,
|
||||||
block.partial
|
block.partial,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -1692,7 +1695,7 @@ export class Cline {
|
|||||||
if (!result) {
|
if (!result) {
|
||||||
this.consecutiveMistakeCount++
|
this.consecutiveMistakeCount++
|
||||||
pushToolResult(
|
pushToolResult(
|
||||||
await this.sayAndCreateMissingParamError("attempt_completion", "result")
|
await this.sayAndCreateMissingParamError("attempt_completion", "result"),
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1793,7 +1796,7 @@ export class Cline {
|
|||||||
|
|
||||||
async recursivelyMakeClineRequests(
|
async recursivelyMakeClineRequests(
|
||||||
userContent: UserContent,
|
userContent: UserContent,
|
||||||
includeFileDetails: boolean = false
|
includeFileDetails: boolean = false,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
if (this.abort) {
|
if (this.abort) {
|
||||||
throw new Error("Cline instance aborted")
|
throw new Error("Cline instance aborted")
|
||||||
@@ -1804,7 +1807,7 @@ export class Cline {
|
|||||||
"mistake_limit_reached",
|
"mistake_limit_reached",
|
||||||
this.api.getModel().id.includes("claude")
|
this.api.getModel().id.includes("claude")
|
||||||
? `This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").`
|
? `This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").`
|
||||||
: "Cline uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities."
|
: "Cline uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities.",
|
||||||
)
|
)
|
||||||
if (response === "messageResponse") {
|
if (response === "messageResponse") {
|
||||||
userContent.push(
|
userContent.push(
|
||||||
@@ -1814,7 +1817,7 @@ export class Cline {
|
|||||||
text: formatResponse.tooManyMistakes(text),
|
text: formatResponse.tooManyMistakes(text),
|
||||||
} as Anthropic.Messages.TextBlockParam,
|
} as Anthropic.Messages.TextBlockParam,
|
||||||
...formatResponse.imageBlocks(images),
|
...formatResponse.imageBlocks(images),
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.consecutiveMistakeCount = 0
|
this.consecutiveMistakeCount = 0
|
||||||
@@ -1830,7 +1833,7 @@ export class Cline {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
request:
|
request:
|
||||||
userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n") + "\n\nLoading...",
|
userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n") + "\n\nLoading...",
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
const [parsedUserContent, environmentDetails] = await this.loadContext(userContent, includeFileDetails)
|
const [parsedUserContent, environmentDetails] = await this.loadContext(userContent, includeFileDetails)
|
||||||
@@ -1872,7 +1875,7 @@ export class Cline {
|
|||||||
inputTokens,
|
inputTokens,
|
||||||
outputTokens,
|
outputTokens,
|
||||||
cacheWriteTokens,
|
cacheWriteTokens,
|
||||||
cacheReadTokens
|
cacheReadTokens,
|
||||||
),
|
),
|
||||||
cancelReason,
|
cancelReason,
|
||||||
streamingFailedMessage,
|
streamingFailedMessage,
|
||||||
@@ -1986,7 +1989,7 @@ export class Cline {
|
|||||||
this.abortTask() // if the stream failed, there's various states the task could be in (i.e. could have streamed some tools the user may have executed), so we just resort to replicating a cancel task
|
this.abortTask() // if the stream failed, there's various states the task could be in (i.e. could have streamed some tools the user may have executed), so we just resort to replicating a cancel task
|
||||||
await abortStream(
|
await abortStream(
|
||||||
"streaming_failed",
|
"streaming_failed",
|
||||||
error.message ?? JSON.stringify(serializeError(error), null, 2)
|
error.message ?? JSON.stringify(serializeError(error), null, 2),
|
||||||
)
|
)
|
||||||
const history = await this.providerRef.deref()?.getTaskWithId(this.taskId)
|
const history = await this.providerRef.deref()?.getTaskWithId(this.taskId)
|
||||||
if (history) {
|
if (history) {
|
||||||
@@ -2053,7 +2056,7 @@ export class Cline {
|
|||||||
// if there's no assistant_responses, that means we got no text or tool_use content blocks from API which we should assume is an error
|
// if there's no assistant_responses, that means we got no text or tool_use content blocks from API which we should assume is an error
|
||||||
await this.say(
|
await this.say(
|
||||||
"error",
|
"error",
|
||||||
"Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output."
|
"Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output.",
|
||||||
)
|
)
|
||||||
await this.addToApiConversationHistory({
|
await this.addToApiConversationHistory({
|
||||||
role: "assistant",
|
role: "assistant",
|
||||||
@@ -2099,7 +2102,7 @@ export class Cline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contentBlock
|
return contentBlock
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
...block,
|
...block,
|
||||||
@@ -2108,7 +2111,7 @@ export class Cline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return block
|
return block
|
||||||
})
|
}),
|
||||||
),
|
),
|
||||||
this.getEnvironmentDetails(includeFileDetails),
|
this.getEnvironmentDetails(includeFileDetails),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ async function getFileOrFolderContent(mentionPath: string, cwd: string): Promise
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
})()
|
})(),
|
||||||
)
|
)
|
||||||
} else if (entry.isDirectory()) {
|
} else if (entry.isDirectory()) {
|
||||||
folderContent += `${linePrefix}${entry.name}/\n`
|
folderContent += `${linePrefix}${entry.name}/\n`
|
||||||
@@ -174,7 +174,7 @@ function getWorkspaceProblems(cwd: string): string {
|
|||||||
const result = diagnosticsToProblemsString(
|
const result = diagnosticsToProblemsString(
|
||||||
diagnostics,
|
diagnostics,
|
||||||
[vscode.DiagnosticSeverity.Error, vscode.DiagnosticSeverity.Warning],
|
[vscode.DiagnosticSeverity.Error, vscode.DiagnosticSeverity.Warning],
|
||||||
cwd
|
cwd,
|
||||||
)
|
)
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return "No errors or warnings detected."
|
return "No errors or warnings detected."
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Otherwise, if you have not completed the task and do not need additional informa
|
|||||||
|
|
||||||
toolResult: (
|
toolResult: (
|
||||||
text: string,
|
text: string,
|
||||||
images?: string[]
|
images?: string[],
|
||||||
): string | Array<Anthropic.TextBlockParam | Anthropic.ImageBlockParam> => {
|
): string | Array<Anthropic.TextBlockParam | Anthropic.ImageBlockParam> => {
|
||||||
if (images && images.length > 0) {
|
if (images && images.length > 0) {
|
||||||
const textBlock: Anthropic.TextBlockParam = { type: "text", text }
|
const textBlock: Anthropic.TextBlockParam = { type: "text", text }
|
||||||
@@ -76,7 +76,7 @@ Otherwise, if you have not completed the task and do not need additional informa
|
|||||||
})
|
})
|
||||||
if (didHitLimit) {
|
if (didHitLimit) {
|
||||||
return `${sorted.join(
|
return `${sorted.join(
|
||||||
"\n"
|
"\n",
|
||||||
)}\n\n(File list truncated. Use list_files on specific subdirectories if you need to explore further.)`
|
)}\n\n(File list truncated. Use list_files on specific subdirectories if you need to explore further.)`
|
||||||
} else if (sorted.length === 0 || (sorted.length === 1 && sorted[0] === "")) {
|
} else if (sorted.length === 0 || (sorted.length === 1 && sorted[0] === "")) {
|
||||||
return "No files found."
|
return "No files found."
|
||||||
@@ -105,7 +105,7 @@ const formatImagesIntoBlocks = (images?: string[]): Anthropic.ImageBlockParam[]
|
|||||||
type: "image",
|
type: "image",
|
||||||
source: { type: "base64", media_type: mimeType, data: base64 },
|
source: { type: "base64", media_type: mimeType, data: base64 },
|
||||||
} as Anthropic.ImageBlockParam
|
} as Anthropic.ImageBlockParam
|
||||||
})
|
})
|
||||||
: []
|
: []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import path from 'path'
|
|||||||
|
|
||||||
export const SYSTEM_PROMPT = async (
|
export const SYSTEM_PROMPT = async (
|
||||||
cwd: string,
|
cwd: string,
|
||||||
supportsComputerUse: boolean
|
supportsComputerUse: boolean,
|
||||||
) => `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
|
) => `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
|
||||||
|
|
||||||
====
|
====
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Therefore, this function should only be called when absolutely necessary to fit
|
|||||||
context limits, not as a continuous process.
|
context limits, not as a continuous process.
|
||||||
*/
|
*/
|
||||||
export function truncateHalfConversation(
|
export function truncateHalfConversation(
|
||||||
messages: Anthropic.Messages.MessageParam[]
|
messages: Anthropic.Messages.MessageParam[],
|
||||||
): Anthropic.Messages.MessageParam[] {
|
): Anthropic.Messages.MessageParam[] {
|
||||||
// API expects messages to be in user-assistant order, and tool use messages must be followed by tool results. We need to maintain this structure while truncating.
|
// API expects messages to be in user-assistant order, and tool use messages must be followed by tool results. We need to maintain this structure while truncating.
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
private workspaceTracker?: WorkspaceTracker
|
private workspaceTracker?: WorkspaceTracker
|
||||||
private latestAnnouncementId = "oct-28-2024" // update to some unique identifier when we add a new announcement
|
private latestAnnouncementId = "oct-28-2024" // update to some unique identifier when we add a new announcement
|
||||||
|
|
||||||
constructor(readonly context: vscode.ExtensionContext, private readonly outputChannel: vscode.OutputChannel) {
|
constructor(
|
||||||
|
readonly context: vscode.ExtensionContext,
|
||||||
|
private readonly outputChannel: vscode.OutputChannel,
|
||||||
|
) {
|
||||||
this.outputChannel.appendLine("ClineProvider instantiated")
|
this.outputChannel.appendLine("ClineProvider instantiated")
|
||||||
ClineProvider.activeInstances.add(this)
|
ClineProvider.activeInstances.add(this)
|
||||||
this.workspaceTracker = new WorkspaceTracker(this)
|
this.workspaceTracker = new WorkspaceTracker(this)
|
||||||
@@ -113,7 +116,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolveWebviewView(
|
resolveWebviewView(
|
||||||
webviewView: vscode.WebviewView | vscode.WebviewPanel
|
webviewView: vscode.WebviewView | vscode.WebviewPanel,
|
||||||
//context: vscode.WebviewViewResolveContext<unknown>, used to recreate a deallocated webview, but we don't need this since we use retainContextWhenHidden
|
//context: vscode.WebviewViewResolveContext<unknown>, used to recreate a deallocated webview, but we don't need this since we use retainContextWhenHidden
|
||||||
//token: vscode.CancellationToken
|
//token: vscode.CancellationToken
|
||||||
): void | Thenable<void> {
|
): void | Thenable<void> {
|
||||||
@@ -146,7 +149,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
this.disposables
|
this.disposables,
|
||||||
)
|
)
|
||||||
} else if ("onDidChangeVisibility" in webviewView) {
|
} else if ("onDidChangeVisibility" in webviewView) {
|
||||||
// sidebar
|
// sidebar
|
||||||
@@ -157,7 +160,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
this.disposables
|
this.disposables,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,7 +171,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
await this.dispose()
|
await this.dispose()
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
this.disposables
|
this.disposables,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Listen for when color changes
|
// Listen for when color changes
|
||||||
@@ -180,7 +183,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
this.disposables
|
this.disposables,
|
||||||
)
|
)
|
||||||
|
|
||||||
// if the extension is starting a new session, clear previous task state
|
// if the extension is starting a new session, clear previous task state
|
||||||
@@ -234,7 +237,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
alwaysAllowBrowser,
|
alwaysAllowBrowser,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
historyItem
|
historyItem,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,7 +341,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
this.postStateToWebview()
|
this.postStateToWebview()
|
||||||
this.workspaceTracker?.initializeFilePaths() // don't await
|
this.workspaceTracker?.initializeFilePaths() // don't await
|
||||||
getTheme().then((theme) =>
|
getTheme().then((theme) =>
|
||||||
this.postMessageToWebview({ type: "theme", text: JSON.stringify(theme) })
|
this.postMessageToWebview({ type: "theme", text: JSON.stringify(theme) }),
|
||||||
)
|
)
|
||||||
// post last cached models in case the call to endpoint fails
|
// post last cached models in case the call to endpoint fails
|
||||||
this.readOpenRouterModels().then((openRouterModels) => {
|
this.readOpenRouterModels().then((openRouterModels) => {
|
||||||
@@ -356,7 +359,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
if (apiConfiguration.openRouterModelId) {
|
if (apiConfiguration.openRouterModelId) {
|
||||||
await this.updateGlobalState(
|
await this.updateGlobalState(
|
||||||
"openRouterModelInfo",
|
"openRouterModelInfo",
|
||||||
openRouterModels[apiConfiguration.openRouterModelId]
|
openRouterModels[apiConfiguration.openRouterModelId],
|
||||||
)
|
)
|
||||||
await this.postStateToWebview()
|
await this.postStateToWebview()
|
||||||
}
|
}
|
||||||
@@ -540,7 +543,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
this.disposables
|
this.disposables,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,7 +629,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
async readOpenRouterModels(): Promise<Record<string, ModelInfo> | undefined> {
|
async readOpenRouterModels(): Promise<Record<string, ModelInfo> | undefined> {
|
||||||
const openRouterModelsFilePath = path.join(
|
const openRouterModelsFilePath = path.join(
|
||||||
await this.ensureCacheDirectoryExists(),
|
await this.ensureCacheDirectoryExists(),
|
||||||
GlobalFileNames.openRouterModels
|
GlobalFileNames.openRouterModels,
|
||||||
)
|
)
|
||||||
const fileExists = await fileExistsAtPath(openRouterModelsFilePath)
|
const fileExists = await fileExistsAtPath(openRouterModelsFilePath)
|
||||||
if (fileExists) {
|
if (fileExists) {
|
||||||
@@ -639,7 +642,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
async refreshOpenRouterModels() {
|
async refreshOpenRouterModels() {
|
||||||
const openRouterModelsFilePath = path.join(
|
const openRouterModelsFilePath = path.join(
|
||||||
await this.ensureCacheDirectoryExists(),
|
await this.ensureCacheDirectoryExists(),
|
||||||
GlobalFileNames.openRouterModels
|
GlobalFileNames.openRouterModels,
|
||||||
)
|
)
|
||||||
|
|
||||||
let models: Record<string, ModelInfo> = {}
|
let models: Record<string, ModelInfo> = {}
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ export function createClineAPI(outputChannel: vscode.OutputChannel, sidebarProvi
|
|||||||
images: images,
|
images: images,
|
||||||
})
|
})
|
||||||
outputChannel.appendLine(
|
outputChannel.appendLine(
|
||||||
`Task started with message: ${task ? `"${task}"` : "undefined"} and ${images?.length || 0} image(s)`
|
`Task started with message: ${task ? `"${task}"` : "undefined"} and ${images?.length || 0} image(s)`,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
sendMessage: async (message?: string, images?: string[]) => {
|
sendMessage: async (message?: string, images?: string[]) => {
|
||||||
outputChannel.appendLine(
|
outputChannel.appendLine(
|
||||||
`Sending message: ${message ? `"${message}"` : "undefined"} with ${images?.length || 0} image(s)`
|
`Sending message: ${message ? `"${message}"` : "undefined"} with ${images?.length || 0} image(s)`,
|
||||||
)
|
)
|
||||||
await sidebarProvider.postMessageToWebview({
|
await sidebarProvider.postMessageToWebview({
|
||||||
type: "invoke",
|
type: "invoke",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
vscode.window.registerWebviewViewProvider(ClineProvider.sideBarId, sidebarProvider, {
|
vscode.window.registerWebviewViewProvider(ClineProvider.sideBarId, sidebarProvider, {
|
||||||
webviewOptions: { retainContextWhenHidden: true },
|
webviewOptions: { retainContextWhenHidden: true },
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
@@ -40,7 +40,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
await sidebarProvider.clearTask()
|
await sidebarProvider.clearTask()
|
||||||
await sidebarProvider.postStateToWebview()
|
await sidebarProvider.postStateToWebview()
|
||||||
await sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
|
await sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
const openClineInNewTab = async () => {
|
const openClineInNewTab = async () => {
|
||||||
@@ -83,13 +83,13 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
vscode.commands.registerCommand("cline.settingsButtonClicked", () => {
|
vscode.commands.registerCommand("cline.settingsButtonClicked", () => {
|
||||||
//vscode.window.showInformationMessage(message)
|
//vscode.window.showInformationMessage(message)
|
||||||
sidebarProvider.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })
|
sidebarProvider.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
vscode.commands.registerCommand("cline.historyButtonClicked", () => {
|
vscode.commands.registerCommand("cline.historyButtonClicked", () => {
|
||||||
sidebarProvider.postMessageToWebview({ type: "action", action: "historyButtonClicked" })
|
sidebarProvider.postMessageToWebview({ type: "action", action: "historyButtonClicked" })
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -105,7 +105,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
vscode.workspace.registerTextDocumentContentProvider(DIFF_VIEW_URI_SCHEME, diffContentProvider)
|
vscode.workspace.registerTextDocumentContentProvider(DIFF_VIEW_URI_SCHEME, diffContentProvider),
|
||||||
)
|
)
|
||||||
|
|
||||||
// URI Handler
|
// URI Handler
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import deepEqual from "fast-deep-equal"
|
|||||||
|
|
||||||
export function getNewDiagnostics(
|
export function getNewDiagnostics(
|
||||||
oldDiagnostics: [vscode.Uri, vscode.Diagnostic[]][],
|
oldDiagnostics: [vscode.Uri, vscode.Diagnostic[]][],
|
||||||
newDiagnostics: [vscode.Uri, vscode.Diagnostic[]][]
|
newDiagnostics: [vscode.Uri, vscode.Diagnostic[]][],
|
||||||
): [vscode.Uri, vscode.Diagnostic[]][] {
|
): [vscode.Uri, vscode.Diagnostic[]][] {
|
||||||
const newProblems: [vscode.Uri, vscode.Diagnostic[]][] = []
|
const newProblems: [vscode.Uri, vscode.Diagnostic[]][] = []
|
||||||
const oldMap = new Map(oldDiagnostics)
|
const oldMap = new Map(oldDiagnostics)
|
||||||
@@ -73,7 +73,7 @@ export function getNewDiagnostics(
|
|||||||
export function diagnosticsToProblemsString(
|
export function diagnosticsToProblemsString(
|
||||||
diagnostics: [vscode.Uri, vscode.Diagnostic[]][],
|
diagnostics: [vscode.Uri, vscode.Diagnostic[]][],
|
||||||
severities: vscode.DiagnosticSeverity[],
|
severities: vscode.DiagnosticSeverity[],
|
||||||
cwd: string
|
cwd: string,
|
||||||
): string {
|
): string {
|
||||||
let result = ""
|
let result = ""
|
||||||
for (const [uri, fileDiagnostics] of diagnostics) {
|
for (const [uri, fileDiagnostics] of diagnostics) {
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ export class DecorationController {
|
|||||||
this.ranges.push(
|
this.ranges.push(
|
||||||
new vscode.Range(
|
new vscode.Range(
|
||||||
new vscode.Position(line + 1, 0),
|
new vscode.Position(line + 1, 0),
|
||||||
new vscode.Position(totalLines - 1, Number.MAX_SAFE_INTEGER)
|
new vscode.Position(totalLines - 1, Number.MAX_SAFE_INTEGER),
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class DiffViewProvider {
|
|||||||
// if the file is already open, ensure it's not dirty before getting its contents
|
// if the file is already open, ensure it's not dirty before getting its contents
|
||||||
if (fileExists) {
|
if (fileExists) {
|
||||||
const existingDocument = vscode.workspace.textDocuments.find((doc) =>
|
const existingDocument = vscode.workspace.textDocuments.find((doc) =>
|
||||||
arePathsEqual(doc.uri.fsPath, absolutePath)
|
arePathsEqual(doc.uri.fsPath, absolutePath),
|
||||||
)
|
)
|
||||||
if (existingDocument && existingDocument.isDirty) {
|
if (existingDocument && existingDocument.isDirty) {
|
||||||
await existingDocument.save()
|
await existingDocument.save()
|
||||||
@@ -62,7 +62,7 @@ export class DiffViewProvider {
|
|||||||
.map((tg) => tg.tabs)
|
.map((tg) => tg.tabs)
|
||||||
.flat()
|
.flat()
|
||||||
.filter(
|
.filter(
|
||||||
(tab) => tab.input instanceof vscode.TabInputText && arePathsEqual(tab.input.uri.fsPath, absolutePath)
|
(tab) => tab.input instanceof vscode.TabInputText && arePathsEqual(tab.input.uri.fsPath, absolutePath),
|
||||||
)
|
)
|
||||||
for (const tab of tabs) {
|
for (const tab of tabs) {
|
||||||
if (!tab.isDirty) {
|
if (!tab.isDirty) {
|
||||||
@@ -179,7 +179,7 @@ export class DiffViewProvider {
|
|||||||
[
|
[
|
||||||
vscode.DiagnosticSeverity.Error, // only including errors since warnings can be distracting (if user wants to fix warnings they can use the @problems mention)
|
vscode.DiagnosticSeverity.Error, // only including errors since warnings can be distracting (if user wants to fix warnings they can use the @problems mention)
|
||||||
],
|
],
|
||||||
this.cwd
|
this.cwd,
|
||||||
) // will be empty string if no errors
|
) // will be empty string if no errors
|
||||||
const newProblemsMessage =
|
const newProblemsMessage =
|
||||||
newProblems.length > 0 ? `\n\nNew problems detected after saving the file:\n${newProblems}` : ""
|
newProblems.length > 0 ? `\n\nNew problems detected after saving the file:\n${newProblems}` : ""
|
||||||
@@ -194,7 +194,7 @@ export class DiffViewProvider {
|
|||||||
const userEdits = formatResponse.createPrettyPatch(
|
const userEdits = formatResponse.createPrettyPatch(
|
||||||
this.relPath.toPosix(),
|
this.relPath.toPosix(),
|
||||||
normalizedNewContent,
|
normalizedNewContent,
|
||||||
normalizedEditedContent
|
normalizedEditedContent,
|
||||||
)
|
)
|
||||||
return { newProblemsMessage, userEdits, finalContent: normalizedEditedContent }
|
return { newProblemsMessage, userEdits, finalContent: normalizedEditedContent }
|
||||||
} else {
|
} else {
|
||||||
@@ -227,7 +227,7 @@ export class DiffViewProvider {
|
|||||||
const edit = new vscode.WorkspaceEdit()
|
const edit = new vscode.WorkspaceEdit()
|
||||||
const fullRange = new vscode.Range(
|
const fullRange = new vscode.Range(
|
||||||
updatedDocument.positionAt(0),
|
updatedDocument.positionAt(0),
|
||||||
updatedDocument.positionAt(updatedDocument.getText().length)
|
updatedDocument.positionAt(updatedDocument.getText().length),
|
||||||
)
|
)
|
||||||
edit.replace(updatedDocument.uri, fullRange, this.originalContent ?? "")
|
edit.replace(updatedDocument.uri, fullRange, this.originalContent ?? "")
|
||||||
// Apply the edit and save, since contents shouldnt have changed this wont show in local history unless of course the user made changes and saved during the edit
|
// Apply the edit and save, since contents shouldnt have changed this wont show in local history unless of course the user made changes and saved during the edit
|
||||||
@@ -251,7 +251,8 @@ export class DiffViewProvider {
|
|||||||
.flatMap((tg) => tg.tabs)
|
.flatMap((tg) => tg.tabs)
|
||||||
.filter(
|
.filter(
|
||||||
(tab) =>
|
(tab) =>
|
||||||
tab.input instanceof vscode.TabInputTextDiff && tab.input?.original?.scheme === DIFF_VIEW_URI_SCHEME
|
tab.input instanceof vscode.TabInputTextDiff &&
|
||||||
|
tab.input?.original?.scheme === DIFF_VIEW_URI_SCHEME,
|
||||||
)
|
)
|
||||||
for (const tab of tabs) {
|
for (const tab of tabs) {
|
||||||
// trying to close dirty views results in save popup
|
// trying to close dirty views results in save popup
|
||||||
@@ -273,7 +274,7 @@ export class DiffViewProvider {
|
|||||||
(tab) =>
|
(tab) =>
|
||||||
tab.input instanceof vscode.TabInputTextDiff &&
|
tab.input instanceof vscode.TabInputTextDiff &&
|
||||||
tab.input?.original?.scheme === DIFF_VIEW_URI_SCHEME &&
|
tab.input?.original?.scheme === DIFF_VIEW_URI_SCHEME &&
|
||||||
arePathsEqual(tab.input.modified.fsPath, uri.fsPath)
|
arePathsEqual(tab.input.modified.fsPath, uri.fsPath),
|
||||||
)
|
)
|
||||||
if (diffTab && diffTab.input instanceof vscode.TabInputTextDiff) {
|
if (diffTab && diffTab.input instanceof vscode.TabInputTextDiff) {
|
||||||
const editor = await vscode.window.showTextDocument(diffTab.input.modified)
|
const editor = await vscode.window.showTextDocument(diffTab.input.modified)
|
||||||
@@ -295,7 +296,7 @@ export class DiffViewProvider {
|
|||||||
query: Buffer.from(this.originalContent ?? "").toString("base64"),
|
query: Buffer.from(this.originalContent ?? "").toString("base64"),
|
||||||
}),
|
}),
|
||||||
uri,
|
uri,
|
||||||
`${fileName}: ${fileExists ? "Original ↔ Cline's Changes" : "New File"} (Editable)`
|
`${fileName}: ${fileExists ? "Original ↔ Cline's Changes" : "New File"} (Editable)`,
|
||||||
)
|
)
|
||||||
// This may happen on very slow machines ie project idx
|
// This may happen on very slow machines ie project idx
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -310,7 +311,7 @@ export class DiffViewProvider {
|
|||||||
const scrollLine = line + 4
|
const scrollLine = line + 4
|
||||||
this.activeDiffEditor.revealRange(
|
this.activeDiffEditor.revealRange(
|
||||||
new vscode.Range(scrollLine, 0, scrollLine, 0),
|
new vscode.Range(scrollLine, 0, scrollLine, 0),
|
||||||
vscode.TextEditorRevealType.InCenter
|
vscode.TextEditorRevealType.InCenter,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -327,7 +328,7 @@ export class DiffViewProvider {
|
|||||||
// Found the first diff, scroll to it
|
// Found the first diff, scroll to it
|
||||||
this.activeDiffEditor.revealRange(
|
this.activeDiffEditor.revealRange(
|
||||||
new vscode.Range(lineCount, 0, lineCount, 0),
|
new vscode.Range(lineCount, 0, lineCount, 0),
|
||||||
vscode.TextEditorRevealType.InCenter
|
vscode.TextEditorRevealType.InCenter,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ export function showOmissionWarning(originalFileContent: string, newFileContent:
|
|||||||
vscode.window
|
vscode.window
|
||||||
.showWarningMessage(
|
.showWarningMessage(
|
||||||
"Potential code truncation detected. This happens when the AI reaches its max output limit.",
|
"Potential code truncation detected. This happens when the AI reaches its max output limit.",
|
||||||
"Follow this guide to fix the issue"
|
"Follow this guide to fix the issue",
|
||||||
)
|
)
|
||||||
.then((selection) => {
|
.then((selection) => {
|
||||||
if (selection === "Follow this guide to fix the issue") {
|
if (selection === "Follow this guide to fix the issue") {
|
||||||
vscode.env.openExternal(
|
vscode.env.openExternal(
|
||||||
vscode.Uri.parse(
|
vscode.Uri.parse(
|
||||||
"https://github.com/cline/cline/wiki/Troubleshooting-%E2%80%90-Cline-Deleting-Code-with-%22Rest-of-Code-Here%22-Comments"
|
"https://github.com/cline/cline/wiki/Troubleshooting-%E2%80%90-Cline-Deleting-Code-with-%22Rest-of-Code-Here%22-Comments",
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function formatContentBlockToMarkdown(
|
|||||||
| Anthropic.TextBlockParam
|
| Anthropic.TextBlockParam
|
||||||
| Anthropic.ImageBlockParam
|
| Anthropic.ImageBlockParam
|
||||||
| Anthropic.ToolUseBlockParam
|
| Anthropic.ToolUseBlockParam
|
||||||
| Anthropic.ToolResultBlockParam
|
| Anthropic.ToolResultBlockParam,
|
||||||
// messages: Anthropic.MessageParam[]
|
// messages: Anthropic.MessageParam[]
|
||||||
): string {
|
): string {
|
||||||
switch (block.type) {
|
switch (block.type) {
|
||||||
|
|||||||
@@ -28,12 +28,13 @@ export async function openFile(absolutePath: string) {
|
|||||||
try {
|
try {
|
||||||
for (const group of vscode.window.tabGroups.all) {
|
for (const group of vscode.window.tabGroups.all) {
|
||||||
const existingTab = group.tabs.find(
|
const existingTab = group.tabs.find(
|
||||||
(tab) => tab.input instanceof vscode.TabInputText && arePathsEqual(tab.input.uri.fsPath, uri.fsPath)
|
(tab) =>
|
||||||
|
tab.input instanceof vscode.TabInputText && arePathsEqual(tab.input.uri.fsPath, uri.fsPath),
|
||||||
)
|
)
|
||||||
if (existingTab) {
|
if (existingTab) {
|
||||||
const activeColumn = vscode.window.activeTextEditor?.viewColumn
|
const activeColumn = vscode.window.activeTextEditor?.viewColumn
|
||||||
const tabColumn = vscode.window.tabGroups.all.find((group) =>
|
const tabColumn = vscode.window.tabGroups.all.find((group) =>
|
||||||
group.tabs.includes(existingTab)
|
group.tabs.includes(existingTab),
|
||||||
)?.viewColumn
|
)?.viewColumn
|
||||||
if (activeColumn && activeColumn !== tabColumn && !existingTab.isDirty) {
|
if (activeColumn && activeColumn !== tabColumn && !existingTab.isDirty) {
|
||||||
await vscode.window.tabGroups.close(existingTab)
|
await vscode.window.tabGroups.close(existingTab)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export async function selectImages(): Promise<string[]> {
|
|||||||
const mimeType = getMimeType(imagePath)
|
const mimeType = getMimeType(imagePath)
|
||||||
const dataUrl = `data:${mimeType};base64,${base64}`
|
const dataUrl = `data:${mimeType};base64,${base64}`
|
||||||
return dataUrl
|
return dataUrl
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ declare module "vscode" {
|
|||||||
onDidStartTerminalShellExecution?: (
|
onDidStartTerminalShellExecution?: (
|
||||||
listener: (e: any) => any,
|
listener: (e: any) => any,
|
||||||
thisArgs?: any,
|
thisArgs?: any,
|
||||||
disposables?: vscode.Disposable[]
|
disposables?: vscode.Disposable[],
|
||||||
) => vscode.Disposable
|
) => vscode.Disposable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export class TerminalProcess extends EventEmitter<TerminalProcessEvents> {
|
|||||||
/* ddateb15026-6a64-40db-b21f-2a621a9830f0]633;CTue Sep 17 06:37:04 EDT 2024 % ]633;D;0]633;P;Cwd=/Users/saoud/Repositories/test */
|
/* ddateb15026-6a64-40db-b21f-2a621a9830f0]633;CTue Sep 17 06:37:04 EDT 2024 % ]633;D;0]633;P;Cwd=/Users/saoud/Repositories/test */
|
||||||
// Gets output between ]633;C (command start) and ]633;D (command end)
|
// Gets output between ]633;C (command start) and ]633;D (command end)
|
||||||
const outputBetweenSequences = this.removeLastLineArtifacts(
|
const outputBetweenSequences = this.removeLastLineArtifacts(
|
||||||
data.match(/\]633;C([\s\S]*?)\]633;D/)?.[1] || ""
|
data.match(/\]633;C([\s\S]*?)\]633;D/)?.[1] || "",
|
||||||
).trim()
|
).trim()
|
||||||
|
|
||||||
// Once we've retrieved any potential output between sequences, we can remove everything up to end of the last sequence
|
// Once we've retrieved any potential output between sequences, we can remove everything up to end of the last sequence
|
||||||
@@ -142,7 +142,7 @@ export class TerminalProcess extends EventEmitter<TerminalProcessEvents> {
|
|||||||
() => {
|
() => {
|
||||||
this.isHot = false
|
this.isHot = false
|
||||||
},
|
},
|
||||||
isCompiling ? PROCESS_HOT_TIMEOUT_COMPILING : PROCESS_HOT_TIMEOUT_NORMAL
|
isCompiling ? PROCESS_HOT_TIMEOUT_COMPILING : PROCESS_HOT_TIMEOUT_NORMAL,
|
||||||
)
|
)
|
||||||
|
|
||||||
// For non-immediately returning commands we want to show loading spinner right away but this wouldnt happen until it emits a line break, so as soon as we get any output we emit "" to let webview know to show spinner
|
// For non-immediately returning commands we want to show loading spinner right away but this wouldnt happen until it emits a line break, so as soon as we get any output we emit "" to let webview know to show spinner
|
||||||
@@ -240,7 +240,7 @@ export type TerminalProcessResultPromise = TerminalProcess & Promise<void>
|
|||||||
export function mergePromise(process: TerminalProcess, promise: Promise<void>): TerminalProcessResultPromise {
|
export function mergePromise(process: TerminalProcess, promise: Promise<void>): TerminalProcessResultPromise {
|
||||||
const nativePromisePrototype = (async () => {})().constructor.prototype
|
const nativePromisePrototype = (async () => {})().constructor.prototype
|
||||||
const descriptors = ["then", "catch", "finally"].map(
|
const descriptors = ["then", "catch", "finally"].map(
|
||||||
(property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)] as const
|
(property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)] as const,
|
||||||
)
|
)
|
||||||
for (const [property, descriptor] of descriptors) {
|
for (const [property, descriptor] of descriptors) {
|
||||||
if (descriptor) {
|
if (descriptor) {
|
||||||
|
|||||||
@@ -1,128 +1,128 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Default Dark Modern",
|
"name": "Default Dark Modern",
|
||||||
"include": "./dark_plus.json",
|
"include": "./dark_plus.json",
|
||||||
"colors": {
|
"colors": {
|
||||||
"activityBar.activeBorder": "#0078D4",
|
"activityBar.activeBorder": "#0078D4",
|
||||||
"activityBar.background": "#181818",
|
"activityBar.background": "#181818",
|
||||||
"activityBar.border": "#2B2B2B",
|
"activityBar.border": "#2B2B2B",
|
||||||
"activityBar.foreground": "#D7D7D7",
|
"activityBar.foreground": "#D7D7D7",
|
||||||
"activityBar.inactiveForeground": "#868686",
|
"activityBar.inactiveForeground": "#868686",
|
||||||
"activityBarBadge.background": "#0078D4",
|
"activityBarBadge.background": "#0078D4",
|
||||||
"activityBarBadge.foreground": "#FFFFFF",
|
"activityBarBadge.foreground": "#FFFFFF",
|
||||||
"badge.background": "#616161",
|
"badge.background": "#616161",
|
||||||
"badge.foreground": "#F8F8F8",
|
"badge.foreground": "#F8F8F8",
|
||||||
"button.background": "#0078D4",
|
"button.background": "#0078D4",
|
||||||
"button.border": "#FFFFFF12",
|
"button.border": "#FFFFFF12",
|
||||||
"button.foreground": "#FFFFFF",
|
"button.foreground": "#FFFFFF",
|
||||||
"button.hoverBackground": "#026EC1",
|
"button.hoverBackground": "#026EC1",
|
||||||
"button.secondaryBackground": "#313131",
|
"button.secondaryBackground": "#313131",
|
||||||
"button.secondaryForeground": "#CCCCCC",
|
"button.secondaryForeground": "#CCCCCC",
|
||||||
"button.secondaryHoverBackground": "#3C3C3C",
|
"button.secondaryHoverBackground": "#3C3C3C",
|
||||||
"chat.slashCommandBackground": "#34414B",
|
"chat.slashCommandBackground": "#34414B",
|
||||||
"chat.slashCommandForeground": "#40A6FF",
|
"chat.slashCommandForeground": "#40A6FF",
|
||||||
"checkbox.background": "#313131",
|
"checkbox.background": "#313131",
|
||||||
"checkbox.border": "#3C3C3C",
|
"checkbox.border": "#3C3C3C",
|
||||||
"debugToolBar.background": "#181818",
|
"debugToolBar.background": "#181818",
|
||||||
"descriptionForeground": "#9D9D9D",
|
"descriptionForeground": "#9D9D9D",
|
||||||
"dropdown.background": "#313131",
|
"dropdown.background": "#313131",
|
||||||
"dropdown.border": "#3C3C3C",
|
"dropdown.border": "#3C3C3C",
|
||||||
"dropdown.foreground": "#CCCCCC",
|
"dropdown.foreground": "#CCCCCC",
|
||||||
"dropdown.listBackground": "#1F1F1F",
|
"dropdown.listBackground": "#1F1F1F",
|
||||||
"editor.background": "#1F1F1F",
|
"editor.background": "#1F1F1F",
|
||||||
"editor.findMatchBackground": "#9E6A03",
|
"editor.findMatchBackground": "#9E6A03",
|
||||||
"editor.foreground": "#CCCCCC",
|
"editor.foreground": "#CCCCCC",
|
||||||
"editorGroup.border": "#FFFFFF17",
|
"editorGroup.border": "#FFFFFF17",
|
||||||
"editorGroupHeader.tabsBackground": "#181818",
|
"editorGroupHeader.tabsBackground": "#181818",
|
||||||
"editorGroupHeader.tabsBorder": "#2B2B2B",
|
"editorGroupHeader.tabsBorder": "#2B2B2B",
|
||||||
"editorGutter.addedBackground": "#2EA043",
|
"editorGutter.addedBackground": "#2EA043",
|
||||||
"editorGutter.deletedBackground": "#F85149",
|
"editorGutter.deletedBackground": "#F85149",
|
||||||
"editorGutter.modifiedBackground": "#0078D4",
|
"editorGutter.modifiedBackground": "#0078D4",
|
||||||
"editorLineNumber.activeForeground": "#CCCCCC",
|
"editorLineNumber.activeForeground": "#CCCCCC",
|
||||||
"editorLineNumber.foreground": "#6E7681",
|
"editorLineNumber.foreground": "#6E7681",
|
||||||
"editorOverviewRuler.border": "#010409",
|
"editorOverviewRuler.border": "#010409",
|
||||||
"editorWidget.background": "#202020",
|
"editorWidget.background": "#202020",
|
||||||
"errorForeground": "#F85149",
|
"errorForeground": "#F85149",
|
||||||
"focusBorder": "#0078D4",
|
"focusBorder": "#0078D4",
|
||||||
"foreground": "#CCCCCC",
|
"foreground": "#CCCCCC",
|
||||||
"icon.foreground": "#CCCCCC",
|
"icon.foreground": "#CCCCCC",
|
||||||
"input.background": "#313131",
|
"input.background": "#313131",
|
||||||
"input.border": "#3C3C3C",
|
"input.border": "#3C3C3C",
|
||||||
"input.foreground": "#CCCCCC",
|
"input.foreground": "#CCCCCC",
|
||||||
"input.placeholderForeground": "#989898",
|
"input.placeholderForeground": "#989898",
|
||||||
"inputOption.activeBackground": "#2489DB82",
|
"inputOption.activeBackground": "#2489DB82",
|
||||||
"inputOption.activeBorder": "#2488DB",
|
"inputOption.activeBorder": "#2488DB",
|
||||||
"keybindingLabel.foreground": "#CCCCCC",
|
"keybindingLabel.foreground": "#CCCCCC",
|
||||||
"menu.background": "#1F1F1F",
|
"menu.background": "#1F1F1F",
|
||||||
"notificationCenterHeader.background": "#1F1F1F",
|
"notificationCenterHeader.background": "#1F1F1F",
|
||||||
"notificationCenterHeader.foreground": "#CCCCCC",
|
"notificationCenterHeader.foreground": "#CCCCCC",
|
||||||
"notifications.background": "#1F1F1F",
|
"notifications.background": "#1F1F1F",
|
||||||
"notifications.border": "#2B2B2B",
|
"notifications.border": "#2B2B2B",
|
||||||
"notifications.foreground": "#CCCCCC",
|
"notifications.foreground": "#CCCCCC",
|
||||||
"panel.background": "#181818",
|
"panel.background": "#181818",
|
||||||
"panel.border": "#2B2B2B",
|
"panel.border": "#2B2B2B",
|
||||||
"panelInput.border": "#2B2B2B",
|
"panelInput.border": "#2B2B2B",
|
||||||
"panelTitle.activeBorder": "#0078D4",
|
"panelTitle.activeBorder": "#0078D4",
|
||||||
"panelTitle.activeForeground": "#CCCCCC",
|
"panelTitle.activeForeground": "#CCCCCC",
|
||||||
"panelTitle.inactiveForeground": "#9D9D9D",
|
"panelTitle.inactiveForeground": "#9D9D9D",
|
||||||
"peekViewEditor.background": "#1F1F1F",
|
"peekViewEditor.background": "#1F1F1F",
|
||||||
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
||||||
"peekViewResult.background": "#1F1F1F",
|
"peekViewResult.background": "#1F1F1F",
|
||||||
"peekViewResult.matchHighlightBackground": "#BB800966",
|
"peekViewResult.matchHighlightBackground": "#BB800966",
|
||||||
"pickerGroup.border": "#3C3C3C",
|
"pickerGroup.border": "#3C3C3C",
|
||||||
"progressBar.background": "#0078D4",
|
"progressBar.background": "#0078D4",
|
||||||
"quickInput.background": "#222222",
|
"quickInput.background": "#222222",
|
||||||
"quickInput.foreground": "#CCCCCC",
|
"quickInput.foreground": "#CCCCCC",
|
||||||
"settings.dropdownBackground": "#313131",
|
"settings.dropdownBackground": "#313131",
|
||||||
"settings.dropdownBorder": "#3C3C3C",
|
"settings.dropdownBorder": "#3C3C3C",
|
||||||
"settings.headerForeground": "#FFFFFF",
|
"settings.headerForeground": "#FFFFFF",
|
||||||
"settings.modifiedItemIndicator": "#BB800966",
|
"settings.modifiedItemIndicator": "#BB800966",
|
||||||
"sideBar.background": "#181818",
|
"sideBar.background": "#181818",
|
||||||
"sideBar.border": "#2B2B2B",
|
"sideBar.border": "#2B2B2B",
|
||||||
"sideBar.foreground": "#CCCCCC",
|
"sideBar.foreground": "#CCCCCC",
|
||||||
"sideBarSectionHeader.background": "#181818",
|
"sideBarSectionHeader.background": "#181818",
|
||||||
"sideBarSectionHeader.border": "#2B2B2B",
|
"sideBarSectionHeader.border": "#2B2B2B",
|
||||||
"sideBarSectionHeader.foreground": "#CCCCCC",
|
"sideBarSectionHeader.foreground": "#CCCCCC",
|
||||||
"sideBarTitle.foreground": "#CCCCCC",
|
"sideBarTitle.foreground": "#CCCCCC",
|
||||||
"statusBar.background": "#181818",
|
"statusBar.background": "#181818",
|
||||||
"statusBar.border": "#2B2B2B",
|
"statusBar.border": "#2B2B2B",
|
||||||
"statusBar.debuggingBackground": "#0078D4",
|
"statusBar.debuggingBackground": "#0078D4",
|
||||||
"statusBar.debuggingForeground": "#FFFFFF",
|
"statusBar.debuggingForeground": "#FFFFFF",
|
||||||
"statusBar.focusBorder": "#0078D4",
|
"statusBar.focusBorder": "#0078D4",
|
||||||
"statusBar.foreground": "#CCCCCC",
|
"statusBar.foreground": "#CCCCCC",
|
||||||
"statusBar.noFolderBackground": "#1F1F1F",
|
"statusBar.noFolderBackground": "#1F1F1F",
|
||||||
"statusBarItem.focusBorder": "#0078D4",
|
"statusBarItem.focusBorder": "#0078D4",
|
||||||
"statusBarItem.prominentBackground": "#6E768166",
|
"statusBarItem.prominentBackground": "#6E768166",
|
||||||
"statusBarItem.remoteBackground": "#0078D4",
|
"statusBarItem.remoteBackground": "#0078D4",
|
||||||
"statusBarItem.remoteForeground": "#FFFFFF",
|
"statusBarItem.remoteForeground": "#FFFFFF",
|
||||||
"tab.activeBackground": "#1F1F1F",
|
"tab.activeBackground": "#1F1F1F",
|
||||||
"tab.activeBorder": "#1F1F1F",
|
"tab.activeBorder": "#1F1F1F",
|
||||||
"tab.activeBorderTop": "#0078D4",
|
"tab.activeBorderTop": "#0078D4",
|
||||||
"tab.activeForeground": "#FFFFFF",
|
"tab.activeForeground": "#FFFFFF",
|
||||||
"tab.border": "#2B2B2B",
|
"tab.border": "#2B2B2B",
|
||||||
"tab.hoverBackground": "#1F1F1F",
|
"tab.hoverBackground": "#1F1F1F",
|
||||||
"tab.inactiveBackground": "#181818",
|
"tab.inactiveBackground": "#181818",
|
||||||
"tab.inactiveForeground": "#9D9D9D",
|
"tab.inactiveForeground": "#9D9D9D",
|
||||||
"tab.unfocusedActiveBorder": "#1F1F1F",
|
"tab.unfocusedActiveBorder": "#1F1F1F",
|
||||||
"tab.unfocusedActiveBorderTop": "#2B2B2B",
|
"tab.unfocusedActiveBorderTop": "#2B2B2B",
|
||||||
"tab.unfocusedHoverBackground": "#1F1F1F",
|
"tab.unfocusedHoverBackground": "#1F1F1F",
|
||||||
"terminal.foreground": "#CCCCCC",
|
"terminal.foreground": "#CCCCCC",
|
||||||
"terminal.tab.activeBorder": "#0078D4",
|
"terminal.tab.activeBorder": "#0078D4",
|
||||||
"textBlockQuote.background": "#2B2B2B",
|
"textBlockQuote.background": "#2B2B2B",
|
||||||
"textBlockQuote.border": "#616161",
|
"textBlockQuote.border": "#616161",
|
||||||
"textCodeBlock.background": "#2B2B2B",
|
"textCodeBlock.background": "#2B2B2B",
|
||||||
"textLink.activeForeground": "#4daafc",
|
"textLink.activeForeground": "#4daafc",
|
||||||
"textLink.foreground": "#4daafc",
|
"textLink.foreground": "#4daafc",
|
||||||
"textPreformat.foreground": "#D0D0D0",
|
"textPreformat.foreground": "#D0D0D0",
|
||||||
"textPreformat.background": "#3C3C3C",
|
"textPreformat.background": "#3C3C3C",
|
||||||
"textSeparator.foreground": "#21262D",
|
"textSeparator.foreground": "#21262D",
|
||||||
"titleBar.activeBackground": "#181818",
|
"titleBar.activeBackground": "#181818",
|
||||||
"titleBar.activeForeground": "#CCCCCC",
|
"titleBar.activeForeground": "#CCCCCC",
|
||||||
"titleBar.border": "#2B2B2B",
|
"titleBar.border": "#2B2B2B",
|
||||||
"titleBar.inactiveBackground": "#1F1F1F",
|
"titleBar.inactiveBackground": "#1F1F1F",
|
||||||
"titleBar.inactiveForeground": "#9D9D9D",
|
"titleBar.inactiveForeground": "#9D9D9D",
|
||||||
"welcomePage.tileBackground": "#2B2B2B",
|
"welcomePage.tileBackground": "#2B2B2B",
|
||||||
"welcomePage.progress.foreground": "#0078D4",
|
"welcomePage.progress.foreground": "#0078D4",
|
||||||
"widget.border": "#313131"
|
"widget.border": "#313131"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,193 +1,193 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Dark+",
|
"name": "Dark+",
|
||||||
"include": "./dark_vs.json",
|
"include": "./dark_vs.json",
|
||||||
"tokenColors": [
|
"tokenColors": [
|
||||||
{
|
{
|
||||||
"name": "Function declarations",
|
"name": "Function declarations",
|
||||||
"scope": [
|
"scope": [
|
||||||
"entity.name.function",
|
"entity.name.function",
|
||||||
"support.function",
|
"support.function",
|
||||||
"support.constant.handlebars",
|
"support.constant.handlebars",
|
||||||
"source.powershell variable.other.member",
|
"source.powershell variable.other.member",
|
||||||
"entity.name.operator.custom-literal"
|
"entity.name.operator.custom-literal"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#DCDCAA"
|
"foreground": "#DCDCAA"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Types declaration and references",
|
"name": "Types declaration and references",
|
||||||
"scope": [
|
"scope": [
|
||||||
"support.class",
|
"support.class",
|
||||||
"support.type",
|
"support.type",
|
||||||
"entity.name.type",
|
"entity.name.type",
|
||||||
"entity.name.namespace",
|
"entity.name.namespace",
|
||||||
"entity.other.attribute",
|
"entity.other.attribute",
|
||||||
"entity.name.scope-resolution",
|
"entity.name.scope-resolution",
|
||||||
"entity.name.class",
|
"entity.name.class",
|
||||||
"storage.type.numeric.go",
|
"storage.type.numeric.go",
|
||||||
"storage.type.byte.go",
|
"storage.type.byte.go",
|
||||||
"storage.type.boolean.go",
|
"storage.type.boolean.go",
|
||||||
"storage.type.string.go",
|
"storage.type.string.go",
|
||||||
"storage.type.uintptr.go",
|
"storage.type.uintptr.go",
|
||||||
"storage.type.error.go",
|
"storage.type.error.go",
|
||||||
"storage.type.rune.go",
|
"storage.type.rune.go",
|
||||||
"storage.type.cs",
|
"storage.type.cs",
|
||||||
"storage.type.generic.cs",
|
"storage.type.generic.cs",
|
||||||
"storage.type.modifier.cs",
|
"storage.type.modifier.cs",
|
||||||
"storage.type.variable.cs",
|
"storage.type.variable.cs",
|
||||||
"storage.type.annotation.java",
|
"storage.type.annotation.java",
|
||||||
"storage.type.generic.java",
|
"storage.type.generic.java",
|
||||||
"storage.type.java",
|
"storage.type.java",
|
||||||
"storage.type.object.array.java",
|
"storage.type.object.array.java",
|
||||||
"storage.type.primitive.array.java",
|
"storage.type.primitive.array.java",
|
||||||
"storage.type.primitive.java",
|
"storage.type.primitive.java",
|
||||||
"storage.type.token.java",
|
"storage.type.token.java",
|
||||||
"storage.type.groovy",
|
"storage.type.groovy",
|
||||||
"storage.type.annotation.groovy",
|
"storage.type.annotation.groovy",
|
||||||
"storage.type.parameters.groovy",
|
"storage.type.parameters.groovy",
|
||||||
"storage.type.generic.groovy",
|
"storage.type.generic.groovy",
|
||||||
"storage.type.object.array.groovy",
|
"storage.type.object.array.groovy",
|
||||||
"storage.type.primitive.array.groovy",
|
"storage.type.primitive.array.groovy",
|
||||||
"storage.type.primitive.groovy"
|
"storage.type.primitive.groovy"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#4EC9B0"
|
"foreground": "#4EC9B0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Types declaration and references, TS grammar specific",
|
"name": "Types declaration and references, TS grammar specific",
|
||||||
"scope": [
|
"scope": [
|
||||||
"meta.type.cast.expr",
|
"meta.type.cast.expr",
|
||||||
"meta.type.new.expr",
|
"meta.type.new.expr",
|
||||||
"support.constant.math",
|
"support.constant.math",
|
||||||
"support.constant.dom",
|
"support.constant.dom",
|
||||||
"support.constant.json",
|
"support.constant.json",
|
||||||
"entity.other.inherited-class"
|
"entity.other.inherited-class"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#4EC9B0"
|
"foreground": "#4EC9B0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Control flow / Special keywords",
|
"name": "Control flow / Special keywords",
|
||||||
"scope": [
|
"scope": [
|
||||||
"keyword.control",
|
"keyword.control",
|
||||||
"source.cpp keyword.operator.new",
|
"source.cpp keyword.operator.new",
|
||||||
"keyword.operator.delete",
|
"keyword.operator.delete",
|
||||||
"keyword.other.using",
|
"keyword.other.using",
|
||||||
"keyword.other.directive.using",
|
"keyword.other.directive.using",
|
||||||
"keyword.other.operator",
|
"keyword.other.operator",
|
||||||
"entity.name.operator"
|
"entity.name.operator"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#C586C0"
|
"foreground": "#C586C0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Variable and parameter name",
|
"name": "Variable and parameter name",
|
||||||
"scope": [
|
"scope": [
|
||||||
"variable",
|
"variable",
|
||||||
"meta.definition.variable.name",
|
"meta.definition.variable.name",
|
||||||
"support.variable",
|
"support.variable",
|
||||||
"entity.name.variable",
|
"entity.name.variable",
|
||||||
"constant.other.placeholder"
|
"constant.other.placeholder"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9CDCFE"
|
"foreground": "#9CDCFE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Constants and enums",
|
"name": "Constants and enums",
|
||||||
"scope": ["variable.other.constant", "variable.other.enummember"],
|
"scope": ["variable.other.constant", "variable.other.enummember"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#4FC1FF"
|
"foreground": "#4FC1FF"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Object keys, TS grammar specific",
|
"name": "Object keys, TS grammar specific",
|
||||||
"scope": ["meta.object-literal.key"],
|
"scope": ["meta.object-literal.key"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9CDCFE"
|
"foreground": "#9CDCFE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CSS property value",
|
"name": "CSS property value",
|
||||||
"scope": [
|
"scope": [
|
||||||
"support.constant.property-value",
|
"support.constant.property-value",
|
||||||
"support.constant.font-name",
|
"support.constant.font-name",
|
||||||
"support.constant.media-type",
|
"support.constant.media-type",
|
||||||
"support.constant.media",
|
"support.constant.media",
|
||||||
"constant.other.color.rgb-value",
|
"constant.other.color.rgb-value",
|
||||||
"constant.other.rgb-value",
|
"constant.other.rgb-value",
|
||||||
"support.constant.color"
|
"support.constant.color"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#CE9178"
|
"foreground": "#CE9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Regular expression groups",
|
"name": "Regular expression groups",
|
||||||
"scope": [
|
"scope": [
|
||||||
"punctuation.definition.group.regexp",
|
"punctuation.definition.group.regexp",
|
||||||
"punctuation.definition.group.assertion.regexp",
|
"punctuation.definition.group.assertion.regexp",
|
||||||
"punctuation.definition.character-class.regexp",
|
"punctuation.definition.character-class.regexp",
|
||||||
"punctuation.character.set.begin.regexp",
|
"punctuation.character.set.begin.regexp",
|
||||||
"punctuation.character.set.end.regexp",
|
"punctuation.character.set.end.regexp",
|
||||||
"keyword.operator.negation.regexp",
|
"keyword.operator.negation.regexp",
|
||||||
"support.other.parenthesis.regexp"
|
"support.other.parenthesis.regexp"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#CE9178"
|
"foreground": "#CE9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"constant.character.character-class.regexp",
|
"constant.character.character-class.regexp",
|
||||||
"constant.other.character-class.set.regexp",
|
"constant.other.character-class.set.regexp",
|
||||||
"constant.other.character-class.regexp",
|
"constant.other.character-class.regexp",
|
||||||
"constant.character.set.regexp"
|
"constant.character.set.regexp"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d16969"
|
"foreground": "#d16969"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#DCDCAA"
|
"foreground": "#DCDCAA"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword.operator.quantifier.regexp",
|
"scope": "keyword.operator.quantifier.regexp",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d7ba7d"
|
"foreground": "#d7ba7d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["constant.character", "constant.other.option"],
|
"scope": ["constant.character", "constant.other.option"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.character.escape",
|
"scope": "constant.character.escape",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d7ba7d"
|
"foreground": "#d7ba7d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.name.label",
|
"scope": "entity.name.label",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#C8C8C8"
|
"foreground": "#C8C8C8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"semanticTokenColors": {
|
"semanticTokenColors": {
|
||||||
"newOperator": "#C586C0",
|
"newOperator": "#C586C0",
|
||||||
"stringLiteral": "#ce9178",
|
"stringLiteral": "#ce9178",
|
||||||
"customLiteral": "#DCDCAA",
|
"customLiteral": "#DCDCAA",
|
||||||
"numberLiteral": "#b5cea8"
|
"numberLiteral": "#b5cea8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,394 +1,391 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Dark (Visual Studio)",
|
"name": "Dark (Visual Studio)",
|
||||||
"colors": {
|
"colors": {
|
||||||
"checkbox.border": "#6B6B6B",
|
"checkbox.border": "#6B6B6B",
|
||||||
"editor.background": "#1E1E1E",
|
"editor.background": "#1E1E1E",
|
||||||
"editor.foreground": "#D4D4D4",
|
"editor.foreground": "#D4D4D4",
|
||||||
"editor.inactiveSelectionBackground": "#3A3D41",
|
"editor.inactiveSelectionBackground": "#3A3D41",
|
||||||
"editorIndentGuide.background1": "#404040",
|
"editorIndentGuide.background1": "#404040",
|
||||||
"editorIndentGuide.activeBackground1": "#707070",
|
"editorIndentGuide.activeBackground1": "#707070",
|
||||||
"editor.selectionHighlightBackground": "#ADD6FF26",
|
"editor.selectionHighlightBackground": "#ADD6FF26",
|
||||||
"list.dropBackground": "#383B3D",
|
"list.dropBackground": "#383B3D",
|
||||||
"activityBarBadge.background": "#007ACC",
|
"activityBarBadge.background": "#007ACC",
|
||||||
"sideBarTitle.foreground": "#BBBBBB",
|
"sideBarTitle.foreground": "#BBBBBB",
|
||||||
"input.placeholderForeground": "#A6A6A6",
|
"input.placeholderForeground": "#A6A6A6",
|
||||||
"menu.background": "#252526",
|
"menu.background": "#252526",
|
||||||
"menu.foreground": "#CCCCCC",
|
"menu.foreground": "#CCCCCC",
|
||||||
"menu.separatorBackground": "#454545",
|
"menu.separatorBackground": "#454545",
|
||||||
"menu.border": "#454545",
|
"menu.border": "#454545",
|
||||||
"statusBarItem.remoteForeground": "#FFF",
|
"statusBarItem.remoteForeground": "#FFF",
|
||||||
"statusBarItem.remoteBackground": "#16825D",
|
"statusBarItem.remoteBackground": "#16825D",
|
||||||
"ports.iconRunningProcessForeground": "#369432",
|
"ports.iconRunningProcessForeground": "#369432",
|
||||||
"sideBarSectionHeader.background": "#0000",
|
"sideBarSectionHeader.background": "#0000",
|
||||||
"sideBarSectionHeader.border": "#ccc3",
|
"sideBarSectionHeader.border": "#ccc3",
|
||||||
"tab.lastPinnedBorder": "#ccc3",
|
"tab.lastPinnedBorder": "#ccc3",
|
||||||
"list.activeSelectionIconForeground": "#FFF",
|
"list.activeSelectionIconForeground": "#FFF",
|
||||||
"terminal.inactiveSelectionBackground": "#3A3D41",
|
"terminal.inactiveSelectionBackground": "#3A3D41",
|
||||||
"widget.border": "#303031",
|
"widget.border": "#303031",
|
||||||
"actionBar.toggledBackground": "#383a49"
|
"actionBar.toggledBackground": "#383a49"
|
||||||
},
|
},
|
||||||
"tokenColors": [
|
"tokenColors": [
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"meta.embedded",
|
"meta.embedded",
|
||||||
"source.groovy.embedded",
|
"source.groovy.embedded",
|
||||||
"string meta.image.inline.markdown",
|
"string meta.image.inline.markdown",
|
||||||
"variable.legacy.builtin.python"
|
"variable.legacy.builtin.python"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#D4D4D4"
|
"foreground": "#D4D4D4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "emphasis",
|
"scope": "emphasis",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "italic"
|
"fontStyle": "italic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "strong",
|
"scope": "strong",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold"
|
"fontStyle": "bold"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "header",
|
"scope": "header",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#000080"
|
"foreground": "#000080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "comment",
|
"scope": "comment",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#6A9955"
|
"foreground": "#6A9955"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.language",
|
"scope": "constant.language",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"constant.numeric",
|
"constant.numeric",
|
||||||
"variable.other.enummember",
|
"variable.other.enummember",
|
||||||
"keyword.operator.plus.exponent",
|
"keyword.operator.plus.exponent",
|
||||||
"keyword.operator.minus.exponent"
|
"keyword.operator.minus.exponent"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#b5cea8"
|
"foreground": "#b5cea8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.regexp",
|
"scope": "constant.regexp",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#646695"
|
"foreground": "#646695"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.name.tag",
|
"scope": "entity.name.tag",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["entity.name.tag.css", "entity.name.tag.less"],
|
"scope": ["entity.name.tag.css", "entity.name.tag.less"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d7ba7d"
|
"foreground": "#d7ba7d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.other.attribute-name",
|
"scope": "entity.other.attribute-name",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9cdcfe"
|
"foreground": "#9cdcfe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"entity.other.attribute-name.class.css",
|
"entity.other.attribute-name.class.css",
|
||||||
"source.css entity.other.attribute-name.class",
|
"source.css entity.other.attribute-name.class",
|
||||||
"entity.other.attribute-name.id.css",
|
"entity.other.attribute-name.id.css",
|
||||||
"entity.other.attribute-name.parent-selector.css",
|
"entity.other.attribute-name.parent-selector.css",
|
||||||
"entity.other.attribute-name.parent.less",
|
"entity.other.attribute-name.parent.less",
|
||||||
"source.css entity.other.attribute-name.pseudo-class",
|
"source.css entity.other.attribute-name.pseudo-class",
|
||||||
"entity.other.attribute-name.pseudo-element.css",
|
"entity.other.attribute-name.pseudo-element.css",
|
||||||
"source.css.less entity.other.attribute-name.id",
|
"source.css.less entity.other.attribute-name.id",
|
||||||
"entity.other.attribute-name.scss"
|
"entity.other.attribute-name.scss"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d7ba7d"
|
"foreground": "#d7ba7d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "invalid",
|
"scope": "invalid",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#f44747"
|
"foreground": "#f44747"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.underline",
|
"scope": "markup.underline",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "underline"
|
"fontStyle": "underline"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.bold",
|
"scope": "markup.bold",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold",
|
"fontStyle": "bold",
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.heading",
|
"scope": "markup.heading",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold",
|
"fontStyle": "bold",
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.italic",
|
"scope": "markup.italic",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "italic"
|
"fontStyle": "italic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.strikethrough",
|
"scope": "markup.strikethrough",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "strikethrough"
|
"fontStyle": "strikethrough"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.inserted",
|
"scope": "markup.inserted",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#b5cea8"
|
"foreground": "#b5cea8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.deleted",
|
"scope": "markup.deleted",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.changed",
|
"scope": "markup.changed",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "punctuation.definition.quote.begin.markdown",
|
"scope": "punctuation.definition.quote.begin.markdown",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#6A9955"
|
"foreground": "#6A9955"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "punctuation.definition.list.begin.markdown",
|
"scope": "punctuation.definition.list.begin.markdown",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#6796e6"
|
"foreground": "#6796e6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.inline.raw",
|
"scope": "markup.inline.raw",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brackets of XML/HTML tags",
|
"name": "brackets of XML/HTML tags",
|
||||||
"scope": "punctuation.definition.tag",
|
"scope": "punctuation.definition.tag",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#808080"
|
"foreground": "#808080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "meta.preprocessor.string",
|
"scope": "meta.preprocessor.string",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "meta.preprocessor.numeric",
|
"scope": "meta.preprocessor.numeric",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#b5cea8"
|
"foreground": "#b5cea8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "meta.structure.dictionary.key.python",
|
"scope": "meta.structure.dictionary.key.python",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9cdcfe"
|
"foreground": "#9cdcfe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "meta.diff.header",
|
"scope": "meta.diff.header",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "storage",
|
"scope": "storage",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "storage.type",
|
"scope": "storage.type",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["string", "meta.embedded.assembly"],
|
"scope": ["string", "meta.embedded.assembly"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "string.tag",
|
"scope": "string.tag",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "string.value",
|
"scope": "string.value",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ce9178"
|
"foreground": "#ce9178"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "string.regexp",
|
"scope": "string.regexp",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d16969"
|
"foreground": "#d16969"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "String interpolation",
|
"name": "String interpolation",
|
||||||
"scope": [
|
"scope": [
|
||||||
"punctuation.definition.template-expression.begin",
|
"punctuation.definition.template-expression.begin",
|
||||||
"punctuation.definition.template-expression.end",
|
"punctuation.definition.template-expression.end",
|
||||||
"punctuation.section.embedded"
|
"punctuation.section.embedded"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Reset JavaScript string interpolation expression",
|
"name": "Reset JavaScript string interpolation expression",
|
||||||
"scope": ["meta.template.expression"],
|
"scope": ["meta.template.expression"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d4d4d4"
|
"foreground": "#d4d4d4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"support.type.vendored.property-name",
|
"support.type.vendored.property-name",
|
||||||
"support.type.property-name",
|
"support.type.property-name",
|
||||||
"source.css variable",
|
"source.css variable",
|
||||||
"source.coffee.embedded"
|
"source.coffee.embedded"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9cdcfe"
|
"foreground": "#9cdcfe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword",
|
"scope": "keyword",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword.control",
|
"scope": "keyword.control",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword.operator",
|
"scope": "keyword.operator",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d4d4d4"
|
"foreground": "#d4d4d4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"keyword.operator.new",
|
"keyword.operator.new",
|
||||||
"keyword.operator.expression",
|
"keyword.operator.expression",
|
||||||
"keyword.operator.cast",
|
"keyword.operator.cast",
|
||||||
"keyword.operator.sizeof",
|
"keyword.operator.sizeof",
|
||||||
"keyword.operator.alignof",
|
"keyword.operator.alignof",
|
||||||
"keyword.operator.typeid",
|
"keyword.operator.typeid",
|
||||||
"keyword.operator.alignas",
|
"keyword.operator.alignas",
|
||||||
"keyword.operator.instanceof",
|
"keyword.operator.instanceof",
|
||||||
"keyword.operator.logical.python",
|
"keyword.operator.logical.python",
|
||||||
"keyword.operator.wordlike"
|
"keyword.operator.wordlike"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#569cd6"
|
"foreground": "#569cd6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword.other.unit",
|
"scope": "keyword.other.unit",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#b5cea8"
|
"foreground": "#b5cea8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
|
||||||
"punctuation.section.embedded.begin.php",
|
"settings": {
|
||||||
"punctuation.section.embedded.end.php"
|
"foreground": "#569cd6"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#569cd6"
|
{
|
||||||
}
|
"scope": "support.function.git-rebase",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#9cdcfe"
|
||||||
"scope": "support.function.git-rebase",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#9cdcfe"
|
{
|
||||||
}
|
"scope": "constant.sha.git-rebase",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#b5cea8"
|
||||||
"scope": "constant.sha.git-rebase",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#b5cea8"
|
{
|
||||||
}
|
"name": "coloring of the Java import and package identifiers",
|
||||||
},
|
"scope": [
|
||||||
{
|
"storage.modifier.import.java",
|
||||||
"name": "coloring of the Java import and package identifiers",
|
"variable.language.wildcard.java",
|
||||||
"scope": [
|
"storage.modifier.package.java"
|
||||||
"storage.modifier.import.java",
|
],
|
||||||
"variable.language.wildcard.java",
|
"settings": {
|
||||||
"storage.modifier.package.java"
|
"foreground": "#d4d4d4"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#d4d4d4"
|
{
|
||||||
}
|
"name": "this.self",
|
||||||
},
|
"scope": "variable.language",
|
||||||
{
|
"settings": {
|
||||||
"name": "this.self",
|
"foreground": "#569cd6"
|
||||||
"scope": "variable.language",
|
}
|
||||||
"settings": {
|
}
|
||||||
"foreground": "#569cd6"
|
],
|
||||||
}
|
"semanticHighlighting": true,
|
||||||
}
|
"semanticTokenColors": {
|
||||||
],
|
"newOperator": "#d4d4d4",
|
||||||
"semanticHighlighting": true,
|
"stringLiteral": "#ce9178",
|
||||||
"semanticTokenColors": {
|
"customLiteral": "#D4D4D4",
|
||||||
"newOperator": "#d4d4d4",
|
"numberLiteral": "#b5cea8"
|
||||||
"stringLiteral": "#ce9178",
|
}
|
||||||
"customLiteral": "#D4D4D4",
|
|
||||||
"numberLiteral": "#b5cea8"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,10 +86,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["entity.name.tag.css", "entity.name.tag.less"],
|
||||||
"entity.name.tag.css",
|
|
||||||
"entity.name.tag.less"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d7ba7d"
|
"foreground": "#d7ba7d"
|
||||||
}
|
}
|
||||||
@@ -173,9 +170,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brackets of XML/HTML tags",
|
"name": "brackets of XML/HTML tags",
|
||||||
"scope": [
|
"scope": ["punctuation.definition.tag"],
|
||||||
"punctuation.definition.tag"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#808080"
|
"foreground": "#808080"
|
||||||
}
|
}
|
||||||
@@ -259,9 +254,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Reset JavaScript string interpolation expression",
|
"name": "Reset JavaScript string interpolation expression",
|
||||||
"scope": [
|
"scope": ["meta.template.expression"],
|
||||||
"meta.template.expression"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#ffffff"
|
"foreground": "#ffffff"
|
||||||
}
|
}
|
||||||
@@ -417,20 +410,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Variable and parameter name",
|
"name": "Variable and parameter name",
|
||||||
"scope": [
|
"scope": ["variable", "meta.definition.variable.name", "support.variable"],
|
||||||
"variable",
|
|
||||||
"meta.definition.variable.name",
|
|
||||||
"support.variable"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9CDCFE"
|
"foreground": "#9CDCFE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Object keys, TS grammar specific",
|
"name": "Object keys, TS grammar specific",
|
||||||
"scope": [
|
"scope": ["meta.object-literal.key"],
|
||||||
"meta.object-literal.key"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#9CDCFE"
|
"foreground": "#9CDCFE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,7 @@
|
|||||||
"name": "Light High Contrast",
|
"name": "Light High Contrast",
|
||||||
"tokenColors": [
|
"tokenColors": [
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["meta.embedded", "source.groovy.embedded", "variable.legacy.builtin.python"],
|
||||||
"meta.embedded",
|
|
||||||
"source.groovy.embedded",
|
|
||||||
"variable.legacy.builtin.python"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#292929"
|
"foreground": "#292929"
|
||||||
}
|
}
|
||||||
@@ -150,10 +146,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["punctuation.definition.quote.begin.markdown", "punctuation.definition.list.begin.markdown"],
|
||||||
"punctuation.definition.quote.begin.markdown",
|
|
||||||
"punctuation.definition.list.begin.markdown"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0451A5"
|
"foreground": "#0451A5"
|
||||||
}
|
}
|
||||||
@@ -335,10 +328,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
|
||||||
"punctuation.section.embedded.begin.php",
|
|
||||||
"punctuation.section.embedded.end.php"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0F4A85"
|
"foreground": "#0F4A85"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,145 +1,145 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Default Light Modern",
|
"name": "Default Light Modern",
|
||||||
"include": "./light_plus.json",
|
"include": "./light_plus.json",
|
||||||
"colors": {
|
"colors": {
|
||||||
"activityBar.activeBorder": "#005FB8",
|
"activityBar.activeBorder": "#005FB8",
|
||||||
"activityBar.background": "#F8F8F8",
|
"activityBar.background": "#F8F8F8",
|
||||||
"activityBar.border": "#E5E5E5",
|
"activityBar.border": "#E5E5E5",
|
||||||
"activityBar.foreground": "#1F1F1F",
|
"activityBar.foreground": "#1F1F1F",
|
||||||
"activityBar.inactiveForeground": "#616161",
|
"activityBar.inactiveForeground": "#616161",
|
||||||
"activityBarBadge.background": "#005FB8",
|
"activityBarBadge.background": "#005FB8",
|
||||||
"activityBarBadge.foreground": "#FFFFFF",
|
"activityBarBadge.foreground": "#FFFFFF",
|
||||||
"badge.background": "#CCCCCC",
|
"badge.background": "#CCCCCC",
|
||||||
"badge.foreground": "#3B3B3B",
|
"badge.foreground": "#3B3B3B",
|
||||||
"button.background": "#005FB8",
|
"button.background": "#005FB8",
|
||||||
"button.border": "#0000001a",
|
"button.border": "#0000001a",
|
||||||
"button.foreground": "#FFFFFF",
|
"button.foreground": "#FFFFFF",
|
||||||
"button.hoverBackground": "#0258A8",
|
"button.hoverBackground": "#0258A8",
|
||||||
"button.secondaryBackground": "#E5E5E5",
|
"button.secondaryBackground": "#E5E5E5",
|
||||||
"button.secondaryForeground": "#3B3B3B",
|
"button.secondaryForeground": "#3B3B3B",
|
||||||
"button.secondaryHoverBackground": "#CCCCCC",
|
"button.secondaryHoverBackground": "#CCCCCC",
|
||||||
"chat.slashCommandBackground": "#D2ECFF",
|
"chat.slashCommandBackground": "#D2ECFF",
|
||||||
"chat.slashCommandForeground": "#306CA2",
|
"chat.slashCommandForeground": "#306CA2",
|
||||||
"checkbox.background": "#F8F8F8",
|
"checkbox.background": "#F8F8F8",
|
||||||
"checkbox.border": "#CECECE",
|
"checkbox.border": "#CECECE",
|
||||||
"descriptionForeground": "#3B3B3B",
|
"descriptionForeground": "#3B3B3B",
|
||||||
"dropdown.background": "#FFFFFF",
|
"dropdown.background": "#FFFFFF",
|
||||||
"dropdown.border": "#CECECE",
|
"dropdown.border": "#CECECE",
|
||||||
"dropdown.foreground": "#3B3B3B",
|
"dropdown.foreground": "#3B3B3B",
|
||||||
"dropdown.listBackground": "#FFFFFF",
|
"dropdown.listBackground": "#FFFFFF",
|
||||||
"editor.background": "#FFFFFF",
|
"editor.background": "#FFFFFF",
|
||||||
"editor.foreground": "#3B3B3B",
|
"editor.foreground": "#3B3B3B",
|
||||||
"editor.inactiveSelectionBackground": "#E5EBF1",
|
"editor.inactiveSelectionBackground": "#E5EBF1",
|
||||||
"editor.selectionHighlightBackground": "#ADD6FF80",
|
"editor.selectionHighlightBackground": "#ADD6FF80",
|
||||||
"editorGroup.border": "#E5E5E5",
|
"editorGroup.border": "#E5E5E5",
|
||||||
"editorGroupHeader.tabsBackground": "#F8F8F8",
|
"editorGroupHeader.tabsBackground": "#F8F8F8",
|
||||||
"editorGroupHeader.tabsBorder": "#E5E5E5",
|
"editorGroupHeader.tabsBorder": "#E5E5E5",
|
||||||
"editorGutter.addedBackground": "#2EA043",
|
"editorGutter.addedBackground": "#2EA043",
|
||||||
"editorGutter.deletedBackground": "#F85149",
|
"editorGutter.deletedBackground": "#F85149",
|
||||||
"editorGutter.modifiedBackground": "#005FB8",
|
"editorGutter.modifiedBackground": "#005FB8",
|
||||||
"editorIndentGuide.background1": "#D3D3D3",
|
"editorIndentGuide.background1": "#D3D3D3",
|
||||||
"editorLineNumber.activeForeground": "#171184",
|
"editorLineNumber.activeForeground": "#171184",
|
||||||
"editorLineNumber.foreground": "#6E7681",
|
"editorLineNumber.foreground": "#6E7681",
|
||||||
"editorOverviewRuler.border": "#E5E5E5",
|
"editorOverviewRuler.border": "#E5E5E5",
|
||||||
"editorSuggestWidget.background": "#F8F8F8",
|
"editorSuggestWidget.background": "#F8F8F8",
|
||||||
"editorWidget.background": "#F8F8F8",
|
"editorWidget.background": "#F8F8F8",
|
||||||
"errorForeground": "#F85149",
|
"errorForeground": "#F85149",
|
||||||
"focusBorder": "#005FB8",
|
"focusBorder": "#005FB8",
|
||||||
"foreground": "#3B3B3B",
|
"foreground": "#3B3B3B",
|
||||||
"icon.foreground": "#3B3B3B",
|
"icon.foreground": "#3B3B3B",
|
||||||
"input.background": "#FFFFFF",
|
"input.background": "#FFFFFF",
|
||||||
"input.border": "#CECECE",
|
"input.border": "#CECECE",
|
||||||
"input.foreground": "#3B3B3B",
|
"input.foreground": "#3B3B3B",
|
||||||
"input.placeholderForeground": "#767676",
|
"input.placeholderForeground": "#767676",
|
||||||
"inputOption.activeBackground": "#BED6ED",
|
"inputOption.activeBackground": "#BED6ED",
|
||||||
"inputOption.activeBorder": "#005FB8",
|
"inputOption.activeBorder": "#005FB8",
|
||||||
"inputOption.activeForeground": "#000000",
|
"inputOption.activeForeground": "#000000",
|
||||||
"keybindingLabel.foreground": "#3B3B3B",
|
"keybindingLabel.foreground": "#3B3B3B",
|
||||||
"list.activeSelectionBackground": "#E8E8E8",
|
"list.activeSelectionBackground": "#E8E8E8",
|
||||||
"list.activeSelectionForeground": "#000000",
|
"list.activeSelectionForeground": "#000000",
|
||||||
"list.activeSelectionIconForeground": "#000000",
|
"list.activeSelectionIconForeground": "#000000",
|
||||||
"list.hoverBackground": "#F2F2F2",
|
"list.hoverBackground": "#F2F2F2",
|
||||||
"list.focusAndSelectionOutline": "#005FB8",
|
"list.focusAndSelectionOutline": "#005FB8",
|
||||||
"menu.border": "#CECECE",
|
"menu.border": "#CECECE",
|
||||||
"notebook.cellBorderColor": "#E5E5E5",
|
"notebook.cellBorderColor": "#E5E5E5",
|
||||||
"notebook.selectedCellBackground": "#C8DDF150",
|
"notebook.selectedCellBackground": "#C8DDF150",
|
||||||
"notificationCenterHeader.background": "#FFFFFF",
|
"notificationCenterHeader.background": "#FFFFFF",
|
||||||
"notificationCenterHeader.foreground": "#3B3B3B",
|
"notificationCenterHeader.foreground": "#3B3B3B",
|
||||||
"notifications.background": "#FFFFFF",
|
"notifications.background": "#FFFFFF",
|
||||||
"notifications.border": "#E5E5E5",
|
"notifications.border": "#E5E5E5",
|
||||||
"notifications.foreground": "#3B3B3B",
|
"notifications.foreground": "#3B3B3B",
|
||||||
"panel.background": "#F8F8F8",
|
"panel.background": "#F8F8F8",
|
||||||
"panel.border": "#E5E5E5",
|
"panel.border": "#E5E5E5",
|
||||||
"panelInput.border": "#E5E5E5",
|
"panelInput.border": "#E5E5E5",
|
||||||
"panelTitle.activeBorder": "#005FB8",
|
"panelTitle.activeBorder": "#005FB8",
|
||||||
"panelTitle.activeForeground": "#3B3B3B",
|
"panelTitle.activeForeground": "#3B3B3B",
|
||||||
"panelTitle.inactiveForeground": "#3B3B3B",
|
"panelTitle.inactiveForeground": "#3B3B3B",
|
||||||
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
||||||
"peekViewResult.background": "#FFFFFF",
|
"peekViewResult.background": "#FFFFFF",
|
||||||
"peekViewResult.matchHighlightBackground": "#BB800966",
|
"peekViewResult.matchHighlightBackground": "#BB800966",
|
||||||
"pickerGroup.border": "#E5E5E5",
|
"pickerGroup.border": "#E5E5E5",
|
||||||
"pickerGroup.foreground": "#8B949E",
|
"pickerGroup.foreground": "#8B949E",
|
||||||
"ports.iconRunningProcessForeground": "#369432",
|
"ports.iconRunningProcessForeground": "#369432",
|
||||||
"progressBar.background": "#005FB8",
|
"progressBar.background": "#005FB8",
|
||||||
"quickInput.background": "#F8F8F8",
|
"quickInput.background": "#F8F8F8",
|
||||||
"quickInput.foreground": "#3B3B3B",
|
"quickInput.foreground": "#3B3B3B",
|
||||||
"searchEditor.textInputBorder": "#CECECE",
|
"searchEditor.textInputBorder": "#CECECE",
|
||||||
"settings.dropdownBackground": "#FFFFFF",
|
"settings.dropdownBackground": "#FFFFFF",
|
||||||
"settings.dropdownBorder": "#CECECE",
|
"settings.dropdownBorder": "#CECECE",
|
||||||
"settings.headerForeground": "#1F1F1F",
|
"settings.headerForeground": "#1F1F1F",
|
||||||
"settings.modifiedItemIndicator": "#BB800966",
|
"settings.modifiedItemIndicator": "#BB800966",
|
||||||
"settings.numberInputBorder": "#CECECE",
|
"settings.numberInputBorder": "#CECECE",
|
||||||
"settings.textInputBorder": "#CECECE",
|
"settings.textInputBorder": "#CECECE",
|
||||||
"sideBar.background": "#F8F8F8",
|
"sideBar.background": "#F8F8F8",
|
||||||
"sideBar.border": "#E5E5E5",
|
"sideBar.border": "#E5E5E5",
|
||||||
"sideBar.foreground": "#3B3B3B",
|
"sideBar.foreground": "#3B3B3B",
|
||||||
"sideBarSectionHeader.background": "#F8F8F8",
|
"sideBarSectionHeader.background": "#F8F8F8",
|
||||||
"sideBarSectionHeader.border": "#E5E5E5",
|
"sideBarSectionHeader.border": "#E5E5E5",
|
||||||
"sideBarSectionHeader.foreground": "#3B3B3B",
|
"sideBarSectionHeader.foreground": "#3B3B3B",
|
||||||
"sideBarTitle.foreground": "#3B3B3B",
|
"sideBarTitle.foreground": "#3B3B3B",
|
||||||
"statusBar.background": "#F8F8F8",
|
"statusBar.background": "#F8F8F8",
|
||||||
"statusBar.foreground": "#3B3B3B",
|
"statusBar.foreground": "#3B3B3B",
|
||||||
"statusBar.border": "#E5E5E5",
|
"statusBar.border": "#E5E5E5",
|
||||||
"statusBar.debuggingBackground": "#FD716C",
|
"statusBar.debuggingBackground": "#FD716C",
|
||||||
"statusBar.debuggingForeground": "#000000",
|
"statusBar.debuggingForeground": "#000000",
|
||||||
"statusBar.focusBorder": "#005FB8",
|
"statusBar.focusBorder": "#005FB8",
|
||||||
"statusBar.noFolderBackground": "#F8F8F8",
|
"statusBar.noFolderBackground": "#F8F8F8",
|
||||||
"statusBarItem.errorBackground": "#C72E0F",
|
"statusBarItem.errorBackground": "#C72E0F",
|
||||||
"statusBarItem.focusBorder": "#005FB8",
|
"statusBarItem.focusBorder": "#005FB8",
|
||||||
"statusBarItem.prominentBackground": "#6E768166",
|
"statusBarItem.prominentBackground": "#6E768166",
|
||||||
"statusBarItem.remoteBackground": "#005FB8",
|
"statusBarItem.remoteBackground": "#005FB8",
|
||||||
"statusBarItem.remoteForeground": "#FFFFFF",
|
"statusBarItem.remoteForeground": "#FFFFFF",
|
||||||
"tab.activeBackground": "#FFFFFF",
|
"tab.activeBackground": "#FFFFFF",
|
||||||
"tab.activeBorder": "#F8F8F8",
|
"tab.activeBorder": "#F8F8F8",
|
||||||
"tab.activeBorderTop": "#005FB8",
|
"tab.activeBorderTop": "#005FB8",
|
||||||
"tab.activeForeground": "#3B3B3B",
|
"tab.activeForeground": "#3B3B3B",
|
||||||
"tab.border": "#E5E5E5",
|
"tab.border": "#E5E5E5",
|
||||||
"tab.hoverBackground": "#FFFFFF",
|
"tab.hoverBackground": "#FFFFFF",
|
||||||
"tab.inactiveBackground": "#F8F8F8",
|
"tab.inactiveBackground": "#F8F8F8",
|
||||||
"tab.inactiveForeground": "#868686",
|
"tab.inactiveForeground": "#868686",
|
||||||
"tab.lastPinnedBorder": "#D4D4D4",
|
"tab.lastPinnedBorder": "#D4D4D4",
|
||||||
"tab.unfocusedActiveBorder": "#F8F8F8",
|
"tab.unfocusedActiveBorder": "#F8F8F8",
|
||||||
"tab.unfocusedActiveBorderTop": "#E5E5E5",
|
"tab.unfocusedActiveBorderTop": "#E5E5E5",
|
||||||
"tab.unfocusedHoverBackground": "#F8F8F8",
|
"tab.unfocusedHoverBackground": "#F8F8F8",
|
||||||
"terminalCursor.foreground": "#005FB8",
|
"terminalCursor.foreground": "#005FB8",
|
||||||
"terminal.foreground": "#3B3B3B",
|
"terminal.foreground": "#3B3B3B",
|
||||||
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
||||||
"terminal.tab.activeBorder": "#005FB8",
|
"terminal.tab.activeBorder": "#005FB8",
|
||||||
"textBlockQuote.background": "#F8F8F8",
|
"textBlockQuote.background": "#F8F8F8",
|
||||||
"textBlockQuote.border": "#E5E5E5",
|
"textBlockQuote.border": "#E5E5E5",
|
||||||
"textCodeBlock.background": "#F8F8F8",
|
"textCodeBlock.background": "#F8F8F8",
|
||||||
"textLink.activeForeground": "#005FB8",
|
"textLink.activeForeground": "#005FB8",
|
||||||
"textLink.foreground": "#005FB8",
|
"textLink.foreground": "#005FB8",
|
||||||
"textPreformat.foreground": "#3B3B3B",
|
"textPreformat.foreground": "#3B3B3B",
|
||||||
"textPreformat.background": "#0000001F",
|
"textPreformat.background": "#0000001F",
|
||||||
"textSeparator.foreground": "#21262D",
|
"textSeparator.foreground": "#21262D",
|
||||||
"titleBar.activeBackground": "#F8F8F8",
|
"titleBar.activeBackground": "#F8F8F8",
|
||||||
"titleBar.activeForeground": "#1E1E1E",
|
"titleBar.activeForeground": "#1E1E1E",
|
||||||
"titleBar.border": "#E5E5E5",
|
"titleBar.border": "#E5E5E5",
|
||||||
"titleBar.inactiveBackground": "#F8F8F8",
|
"titleBar.inactiveBackground": "#F8F8F8",
|
||||||
"titleBar.inactiveForeground": "#8B949E",
|
"titleBar.inactiveForeground": "#8B949E",
|
||||||
"welcomePage.tileBackground": "#F3F3F3",
|
"welcomePage.tileBackground": "#F3F3F3",
|
||||||
"widget.border": "#E5E5E5"
|
"widget.border": "#E5E5E5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,194 +1,194 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Light+",
|
"name": "Light+",
|
||||||
"include": "./light_vs.json",
|
"include": "./light_vs.json",
|
||||||
"tokenColors": [
|
"tokenColors": [
|
||||||
{
|
{
|
||||||
"name": "Function declarations",
|
"name": "Function declarations",
|
||||||
"scope": [
|
"scope": [
|
||||||
"entity.name.function",
|
"entity.name.function",
|
||||||
"support.function",
|
"support.function",
|
||||||
"support.constant.handlebars",
|
"support.constant.handlebars",
|
||||||
"source.powershell variable.other.member",
|
"source.powershell variable.other.member",
|
||||||
"entity.name.operator.custom-literal"
|
"entity.name.operator.custom-literal"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#795E26"
|
"foreground": "#795E26"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Types declaration and references",
|
"name": "Types declaration and references",
|
||||||
"scope": [
|
"scope": [
|
||||||
"support.class",
|
"support.class",
|
||||||
"support.type",
|
"support.type",
|
||||||
"entity.name.type",
|
"entity.name.type",
|
||||||
"entity.name.namespace",
|
"entity.name.namespace",
|
||||||
"entity.other.attribute",
|
"entity.other.attribute",
|
||||||
"entity.name.scope-resolution",
|
"entity.name.scope-resolution",
|
||||||
"entity.name.class",
|
"entity.name.class",
|
||||||
"storage.type.numeric.go",
|
"storage.type.numeric.go",
|
||||||
"storage.type.byte.go",
|
"storage.type.byte.go",
|
||||||
"storage.type.boolean.go",
|
"storage.type.boolean.go",
|
||||||
"storage.type.string.go",
|
"storage.type.string.go",
|
||||||
"storage.type.uintptr.go",
|
"storage.type.uintptr.go",
|
||||||
"storage.type.error.go",
|
"storage.type.error.go",
|
||||||
"storage.type.rune.go",
|
"storage.type.rune.go",
|
||||||
"storage.type.cs",
|
"storage.type.cs",
|
||||||
"storage.type.generic.cs",
|
"storage.type.generic.cs",
|
||||||
"storage.type.modifier.cs",
|
"storage.type.modifier.cs",
|
||||||
"storage.type.variable.cs",
|
"storage.type.variable.cs",
|
||||||
"storage.type.annotation.java",
|
"storage.type.annotation.java",
|
||||||
"storage.type.generic.java",
|
"storage.type.generic.java",
|
||||||
"storage.type.java",
|
"storage.type.java",
|
||||||
"storage.type.object.array.java",
|
"storage.type.object.array.java",
|
||||||
"storage.type.primitive.array.java",
|
"storage.type.primitive.array.java",
|
||||||
"storage.type.primitive.java",
|
"storage.type.primitive.java",
|
||||||
"storage.type.token.java",
|
"storage.type.token.java",
|
||||||
"storage.type.groovy",
|
"storage.type.groovy",
|
||||||
"storage.type.annotation.groovy",
|
"storage.type.annotation.groovy",
|
||||||
"storage.type.parameters.groovy",
|
"storage.type.parameters.groovy",
|
||||||
"storage.type.generic.groovy",
|
"storage.type.generic.groovy",
|
||||||
"storage.type.object.array.groovy",
|
"storage.type.object.array.groovy",
|
||||||
"storage.type.primitive.array.groovy",
|
"storage.type.primitive.array.groovy",
|
||||||
"storage.type.primitive.groovy"
|
"storage.type.primitive.groovy"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#267f99"
|
"foreground": "#267f99"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Types declaration and references, TS grammar specific",
|
"name": "Types declaration and references, TS grammar specific",
|
||||||
"scope": [
|
"scope": [
|
||||||
"meta.type.cast.expr",
|
"meta.type.cast.expr",
|
||||||
"meta.type.new.expr",
|
"meta.type.new.expr",
|
||||||
"support.constant.math",
|
"support.constant.math",
|
||||||
"support.constant.dom",
|
"support.constant.dom",
|
||||||
"support.constant.json",
|
"support.constant.json",
|
||||||
"entity.other.inherited-class"
|
"entity.other.inherited-class"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#267f99"
|
"foreground": "#267f99"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Control flow / Special keywords",
|
"name": "Control flow / Special keywords",
|
||||||
"scope": [
|
"scope": [
|
||||||
"keyword.control",
|
"keyword.control",
|
||||||
"source.cpp keyword.operator.new",
|
"source.cpp keyword.operator.new",
|
||||||
"source.cpp keyword.operator.delete",
|
"source.cpp keyword.operator.delete",
|
||||||
"keyword.other.using",
|
"keyword.other.using",
|
||||||
"keyword.other.directive.using",
|
"keyword.other.directive.using",
|
||||||
"keyword.other.operator",
|
"keyword.other.operator",
|
||||||
"entity.name.operator"
|
"entity.name.operator"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#AF00DB"
|
"foreground": "#AF00DB"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Variable and parameter name",
|
"name": "Variable and parameter name",
|
||||||
"scope": [
|
"scope": [
|
||||||
"variable",
|
"variable",
|
||||||
"meta.definition.variable.name",
|
"meta.definition.variable.name",
|
||||||
"support.variable",
|
"support.variable",
|
||||||
"entity.name.variable",
|
"entity.name.variable",
|
||||||
"constant.other.placeholder"
|
"constant.other.placeholder"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#001080"
|
"foreground": "#001080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Constants and enums",
|
"name": "Constants and enums",
|
||||||
"scope": ["variable.other.constant", "variable.other.enummember"],
|
"scope": ["variable.other.constant", "variable.other.enummember"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0070C1"
|
"foreground": "#0070C1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Object keys, TS grammar specific",
|
"name": "Object keys, TS grammar specific",
|
||||||
"scope": ["meta.object-literal.key"],
|
"scope": ["meta.object-literal.key"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#001080"
|
"foreground": "#001080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CSS property value",
|
"name": "CSS property value",
|
||||||
"scope": [
|
"scope": [
|
||||||
"support.constant.property-value",
|
"support.constant.property-value",
|
||||||
"support.constant.font-name",
|
"support.constant.font-name",
|
||||||
"support.constant.media-type",
|
"support.constant.media-type",
|
||||||
"support.constant.media",
|
"support.constant.media",
|
||||||
"constant.other.color.rgb-value",
|
"constant.other.color.rgb-value",
|
||||||
"constant.other.rgb-value",
|
"constant.other.rgb-value",
|
||||||
"support.constant.color"
|
"support.constant.color"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0451a5"
|
"foreground": "#0451a5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Regular expression groups",
|
"name": "Regular expression groups",
|
||||||
"scope": [
|
"scope": [
|
||||||
"punctuation.definition.group.regexp",
|
"punctuation.definition.group.regexp",
|
||||||
"punctuation.definition.group.assertion.regexp",
|
"punctuation.definition.group.assertion.regexp",
|
||||||
"punctuation.definition.character-class.regexp",
|
"punctuation.definition.character-class.regexp",
|
||||||
"punctuation.character.set.begin.regexp",
|
"punctuation.character.set.begin.regexp",
|
||||||
"punctuation.character.set.end.regexp",
|
"punctuation.character.set.end.regexp",
|
||||||
"keyword.operator.negation.regexp",
|
"keyword.operator.negation.regexp",
|
||||||
"support.other.parenthesis.regexp"
|
"support.other.parenthesis.regexp"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#d16969"
|
"foreground": "#d16969"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"constant.character.character-class.regexp",
|
"constant.character.character-class.regexp",
|
||||||
"constant.other.character-class.set.regexp",
|
"constant.other.character-class.set.regexp",
|
||||||
"constant.other.character-class.regexp",
|
"constant.other.character-class.regexp",
|
||||||
"constant.character.set.regexp"
|
"constant.character.set.regexp"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#811f3f"
|
"foreground": "#811f3f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "keyword.operator.quantifier.regexp",
|
"scope": "keyword.operator.quantifier.regexp",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#000000"
|
"foreground": "#000000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#EE0000"
|
"foreground": "#EE0000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": ["constant.character", "constant.other.option"],
|
"scope": ["constant.character", "constant.other.option"],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0000ff"
|
"foreground": "#0000ff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.character.escape",
|
"scope": "constant.character.escape",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#EE0000"
|
"foreground": "#EE0000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.name.label",
|
"scope": "entity.name.label",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#000000"
|
"foreground": "#000000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"semanticHighlighting": true,
|
"semanticHighlighting": true,
|
||||||
"semanticTokenColors": {
|
"semanticTokenColors": {
|
||||||
"newOperator": "#AF00DB",
|
"newOperator": "#AF00DB",
|
||||||
"stringLiteral": "#a31515",
|
"stringLiteral": "#a31515",
|
||||||
"customLiteral": "#795E26",
|
"customLiteral": "#795E26",
|
||||||
"numberLiteral": "#098658"
|
"numberLiteral": "#098658"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,422 +1,416 @@
|
|||||||
{
|
{
|
||||||
"$schema": "vscode://schemas/color-theme",
|
"$schema": "vscode://schemas/color-theme",
|
||||||
"name": "Light (Visual Studio)",
|
"name": "Light (Visual Studio)",
|
||||||
"colors": {
|
"colors": {
|
||||||
"checkbox.border": "#919191",
|
"checkbox.border": "#919191",
|
||||||
"editor.background": "#FFFFFF",
|
"editor.background": "#FFFFFF",
|
||||||
"editor.foreground": "#000000",
|
"editor.foreground": "#000000",
|
||||||
"editor.inactiveSelectionBackground": "#E5EBF1",
|
"editor.inactiveSelectionBackground": "#E5EBF1",
|
||||||
"editorIndentGuide.background1": "#D3D3D3",
|
"editorIndentGuide.background1": "#D3D3D3",
|
||||||
"editorIndentGuide.activeBackground1": "#939393",
|
"editorIndentGuide.activeBackground1": "#939393",
|
||||||
"editor.selectionHighlightBackground": "#ADD6FF80",
|
"editor.selectionHighlightBackground": "#ADD6FF80",
|
||||||
"editorSuggestWidget.background": "#F3F3F3",
|
"editorSuggestWidget.background": "#F3F3F3",
|
||||||
"activityBarBadge.background": "#007ACC",
|
"activityBarBadge.background": "#007ACC",
|
||||||
"sideBarTitle.foreground": "#6F6F6F",
|
"sideBarTitle.foreground": "#6F6F6F",
|
||||||
"list.hoverBackground": "#E8E8E8",
|
"list.hoverBackground": "#E8E8E8",
|
||||||
"menu.border": "#D4D4D4",
|
"menu.border": "#D4D4D4",
|
||||||
"input.placeholderForeground": "#767676",
|
"input.placeholderForeground": "#767676",
|
||||||
"searchEditor.textInputBorder": "#CECECE",
|
"searchEditor.textInputBorder": "#CECECE",
|
||||||
"settings.textInputBorder": "#CECECE",
|
"settings.textInputBorder": "#CECECE",
|
||||||
"settings.numberInputBorder": "#CECECE",
|
"settings.numberInputBorder": "#CECECE",
|
||||||
"statusBarItem.remoteForeground": "#FFF",
|
"statusBarItem.remoteForeground": "#FFF",
|
||||||
"statusBarItem.remoteBackground": "#16825D",
|
"statusBarItem.remoteBackground": "#16825D",
|
||||||
"ports.iconRunningProcessForeground": "#369432",
|
"ports.iconRunningProcessForeground": "#369432",
|
||||||
"sideBarSectionHeader.background": "#0000",
|
"sideBarSectionHeader.background": "#0000",
|
||||||
"sideBarSectionHeader.border": "#61616130",
|
"sideBarSectionHeader.border": "#61616130",
|
||||||
"tab.lastPinnedBorder": "#61616130",
|
"tab.lastPinnedBorder": "#61616130",
|
||||||
"notebook.cellBorderColor": "#E8E8E8",
|
"notebook.cellBorderColor": "#E8E8E8",
|
||||||
"notebook.selectedCellBackground": "#c8ddf150",
|
"notebook.selectedCellBackground": "#c8ddf150",
|
||||||
"statusBarItem.errorBackground": "#c72e0f",
|
"statusBarItem.errorBackground": "#c72e0f",
|
||||||
"list.activeSelectionIconForeground": "#FFF",
|
"list.activeSelectionIconForeground": "#FFF",
|
||||||
"list.focusAndSelectionOutline": "#90C2F9",
|
"list.focusAndSelectionOutline": "#90C2F9",
|
||||||
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
||||||
"widget.border": "#d4d4d4",
|
"widget.border": "#d4d4d4",
|
||||||
"actionBar.toggledBackground": "#dddddd",
|
"actionBar.toggledBackground": "#dddddd",
|
||||||
"diffEditor.unchangedRegionBackground": "#f8f8f8"
|
"diffEditor.unchangedRegionBackground": "#f8f8f8"
|
||||||
},
|
},
|
||||||
"tokenColors": [
|
"tokenColors": [
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"meta.embedded",
|
"meta.embedded",
|
||||||
"source.groovy.embedded",
|
"source.groovy.embedded",
|
||||||
"string meta.image.inline.markdown",
|
"string meta.image.inline.markdown",
|
||||||
"variable.legacy.builtin.python"
|
"variable.legacy.builtin.python"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#000000ff"
|
"foreground": "#000000ff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "emphasis",
|
"scope": "emphasis",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "italic"
|
"fontStyle": "italic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "strong",
|
"scope": "strong",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold"
|
"fontStyle": "bold"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "meta.diff.header",
|
"scope": "meta.diff.header",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#000080"
|
"foreground": "#000080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "comment",
|
"scope": "comment",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#008000"
|
"foreground": "#008000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.language",
|
"scope": "constant.language",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0000ff"
|
"foreground": "#0000ff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"constant.numeric",
|
"constant.numeric",
|
||||||
"variable.other.enummember",
|
"variable.other.enummember",
|
||||||
"keyword.operator.plus.exponent",
|
"keyword.operator.plus.exponent",
|
||||||
"keyword.operator.minus.exponent"
|
"keyword.operator.minus.exponent"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#098658"
|
"foreground": "#098658"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.regexp",
|
"scope": "constant.regexp",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#811f3f"
|
"foreground": "#811f3f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "css tags in selectors, xml tags",
|
"name": "css tags in selectors, xml tags",
|
||||||
"scope": "entity.name.tag",
|
"scope": "entity.name.tag",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#800000"
|
"foreground": "#800000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.name.selector",
|
"scope": "entity.name.selector",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#800000"
|
"foreground": "#800000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "entity.other.attribute-name",
|
"scope": "entity.other.attribute-name",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#e50000"
|
"foreground": "#e50000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": [
|
||||||
"entity.other.attribute-name.class.css",
|
"entity.other.attribute-name.class.css",
|
||||||
"source.css entity.other.attribute-name.class",
|
"source.css entity.other.attribute-name.class",
|
||||||
"entity.other.attribute-name.id.css",
|
"entity.other.attribute-name.id.css",
|
||||||
"entity.other.attribute-name.parent-selector.css",
|
"entity.other.attribute-name.parent-selector.css",
|
||||||
"entity.other.attribute-name.parent.less",
|
"entity.other.attribute-name.parent.less",
|
||||||
"source.css entity.other.attribute-name.pseudo-class",
|
"source.css entity.other.attribute-name.pseudo-class",
|
||||||
"entity.other.attribute-name.pseudo-element.css",
|
"entity.other.attribute-name.pseudo-element.css",
|
||||||
"source.css.less entity.other.attribute-name.id",
|
"source.css.less entity.other.attribute-name.id",
|
||||||
"entity.other.attribute-name.scss"
|
"entity.other.attribute-name.scss"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#800000"
|
"foreground": "#800000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "invalid",
|
"scope": "invalid",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#cd3131"
|
"foreground": "#cd3131"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.underline",
|
"scope": "markup.underline",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "underline"
|
"fontStyle": "underline"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.bold",
|
"scope": "markup.bold",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold",
|
"fontStyle": "bold",
|
||||||
"foreground": "#000080"
|
"foreground": "#000080"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.heading",
|
"scope": "markup.heading",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "bold",
|
"fontStyle": "bold",
|
||||||
"foreground": "#800000"
|
"foreground": "#800000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.italic",
|
"scope": "markup.italic",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "italic"
|
"fontStyle": "italic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.strikethrough",
|
"scope": "markup.strikethrough",
|
||||||
"settings": {
|
"settings": {
|
||||||
"fontStyle": "strikethrough"
|
"fontStyle": "strikethrough"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.inserted",
|
"scope": "markup.inserted",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#098658"
|
"foreground": "#098658"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.deleted",
|
"scope": "markup.deleted",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#a31515"
|
"foreground": "#a31515"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "markup.changed",
|
"scope": "markup.changed",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0451a5"
|
"foreground": "#0451a5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": [
|
"scope": ["punctuation.definition.quote.begin.markdown", "punctuation.definition.list.begin.markdown"],
|
||||||
"punctuation.definition.quote.begin.markdown",
|
"settings": {
|
||||||
"punctuation.definition.list.begin.markdown"
|
"foreground": "#0451a5"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0451a5"
|
{
|
||||||
}
|
"scope": "markup.inline.raw",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#800000"
|
||||||
"scope": "markup.inline.raw",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#800000"
|
{
|
||||||
}
|
"name": "brackets of XML/HTML tags",
|
||||||
},
|
"scope": "punctuation.definition.tag",
|
||||||
{
|
"settings": {
|
||||||
"name": "brackets of XML/HTML tags",
|
"foreground": "#800000"
|
||||||
"scope": "punctuation.definition.tag",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#800000"
|
{
|
||||||
}
|
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "meta.preprocessor.string",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#a31515"
|
||||||
"scope": "meta.preprocessor.string",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#a31515"
|
{
|
||||||
}
|
"scope": "meta.preprocessor.numeric",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#098658"
|
||||||
"scope": "meta.preprocessor.numeric",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#098658"
|
{
|
||||||
}
|
"scope": "meta.structure.dictionary.key.python",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0451a5"
|
||||||
"scope": "meta.structure.dictionary.key.python",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0451a5"
|
{
|
||||||
}
|
"scope": "storage",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": "storage",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "storage.type",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": "storage.type",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": ["string", "meta.embedded.assembly"],
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#a31515"
|
||||||
"scope": ["string", "meta.embedded.assembly"],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#a31515"
|
{
|
||||||
}
|
"scope": [
|
||||||
},
|
"string.comment.buffered.block.pug",
|
||||||
{
|
"string.quoted.pug",
|
||||||
"scope": [
|
"string.interpolated.pug",
|
||||||
"string.comment.buffered.block.pug",
|
"string.unquoted.plain.in.yaml",
|
||||||
"string.quoted.pug",
|
"string.unquoted.plain.out.yaml",
|
||||||
"string.interpolated.pug",
|
"string.unquoted.block.yaml",
|
||||||
"string.unquoted.plain.in.yaml",
|
"string.quoted.single.yaml",
|
||||||
"string.unquoted.plain.out.yaml",
|
"string.quoted.double.xml",
|
||||||
"string.unquoted.block.yaml",
|
"string.quoted.single.xml",
|
||||||
"string.quoted.single.yaml",
|
"string.unquoted.cdata.xml",
|
||||||
"string.quoted.double.xml",
|
"string.quoted.double.html",
|
||||||
"string.quoted.single.xml",
|
"string.quoted.single.html",
|
||||||
"string.unquoted.cdata.xml",
|
"string.unquoted.html",
|
||||||
"string.quoted.double.html",
|
"string.quoted.single.handlebars",
|
||||||
"string.quoted.single.html",
|
"string.quoted.double.handlebars"
|
||||||
"string.unquoted.html",
|
],
|
||||||
"string.quoted.single.handlebars",
|
"settings": {
|
||||||
"string.quoted.double.handlebars"
|
"foreground": "#0000ff"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "string.regexp",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#811f3f"
|
||||||
"scope": "string.regexp",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#811f3f"
|
{
|
||||||
}
|
"name": "String interpolation",
|
||||||
},
|
"scope": [
|
||||||
{
|
"punctuation.definition.template-expression.begin",
|
||||||
"name": "String interpolation",
|
"punctuation.definition.template-expression.end",
|
||||||
"scope": [
|
"punctuation.section.embedded"
|
||||||
"punctuation.definition.template-expression.begin",
|
],
|
||||||
"punctuation.definition.template-expression.end",
|
"settings": {
|
||||||
"punctuation.section.embedded"
|
"foreground": "#0000ff"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"name": "Reset JavaScript string interpolation expression",
|
||||||
},
|
"scope": ["meta.template.expression"],
|
||||||
{
|
"settings": {
|
||||||
"name": "Reset JavaScript string interpolation expression",
|
"foreground": "#000000"
|
||||||
"scope": ["meta.template.expression"],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#000000"
|
{
|
||||||
}
|
"scope": [
|
||||||
},
|
"support.constant.property-value",
|
||||||
{
|
"support.constant.font-name",
|
||||||
"scope": [
|
"support.constant.media-type",
|
||||||
"support.constant.property-value",
|
"support.constant.media",
|
||||||
"support.constant.font-name",
|
"constant.other.color.rgb-value",
|
||||||
"support.constant.media-type",
|
"constant.other.rgb-value",
|
||||||
"support.constant.media",
|
"support.constant.color"
|
||||||
"constant.other.color.rgb-value",
|
],
|
||||||
"constant.other.rgb-value",
|
"settings": {
|
||||||
"support.constant.color"
|
"foreground": "#0451a5"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0451a5"
|
{
|
||||||
}
|
"scope": [
|
||||||
},
|
"support.type.vendored.property-name",
|
||||||
{
|
"support.type.property-name",
|
||||||
"scope": [
|
"source.css variable",
|
||||||
"support.type.vendored.property-name",
|
"source.coffee.embedded"
|
||||||
"support.type.property-name",
|
],
|
||||||
"source.css variable",
|
"settings": {
|
||||||
"source.coffee.embedded"
|
"foreground": "#e50000"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#e50000"
|
{
|
||||||
}
|
"scope": ["support.type.property-name.json"],
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0451a5"
|
||||||
"scope": ["support.type.property-name.json"],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0451a5"
|
{
|
||||||
}
|
"scope": "keyword",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": "keyword",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "keyword.control",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#0000ff"
|
||||||
"scope": "keyword.control",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "keyword.operator",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#000000"
|
||||||
"scope": "keyword.operator",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#000000"
|
{
|
||||||
}
|
"scope": [
|
||||||
},
|
"keyword.operator.new",
|
||||||
{
|
"keyword.operator.expression",
|
||||||
"scope": [
|
"keyword.operator.cast",
|
||||||
"keyword.operator.new",
|
"keyword.operator.sizeof",
|
||||||
"keyword.operator.expression",
|
"keyword.operator.alignof",
|
||||||
"keyword.operator.cast",
|
"keyword.operator.typeid",
|
||||||
"keyword.operator.sizeof",
|
"keyword.operator.alignas",
|
||||||
"keyword.operator.alignof",
|
"keyword.operator.instanceof",
|
||||||
"keyword.operator.typeid",
|
"keyword.operator.logical.python",
|
||||||
"keyword.operator.alignas",
|
"keyword.operator.wordlike"
|
||||||
"keyword.operator.instanceof",
|
],
|
||||||
"keyword.operator.logical.python",
|
"settings": {
|
||||||
"keyword.operator.wordlike"
|
"foreground": "#0000ff"
|
||||||
],
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#0000ff"
|
{
|
||||||
}
|
"scope": "keyword.other.unit",
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#098658"
|
||||||
"scope": "keyword.other.unit",
|
}
|
||||||
"settings": {
|
},
|
||||||
"foreground": "#098658"
|
{
|
||||||
}
|
"scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
|
||||||
},
|
"settings": {
|
||||||
{
|
"foreground": "#800000"
|
||||||
"scope": [
|
}
|
||||||
"punctuation.section.embedded.begin.php",
|
},
|
||||||
"punctuation.section.embedded.end.php"
|
{
|
||||||
],
|
"scope": "support.function.git-rebase",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#800000"
|
"foreground": "#0451a5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "support.function.git-rebase",
|
"scope": "constant.sha.git-rebase",
|
||||||
"settings": {
|
"settings": {
|
||||||
"foreground": "#0451a5"
|
"foreground": "#098658"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scope": "constant.sha.git-rebase",
|
"name": "coloring of the Java import and package identifiers",
|
||||||
"settings": {
|
"scope": [
|
||||||
"foreground": "#098658"
|
"storage.modifier.import.java",
|
||||||
}
|
"variable.language.wildcard.java",
|
||||||
},
|
"storage.modifier.package.java"
|
||||||
{
|
],
|
||||||
"name": "coloring of the Java import and package identifiers",
|
"settings": {
|
||||||
"scope": [
|
"foreground": "#000000"
|
||||||
"storage.modifier.import.java",
|
}
|
||||||
"variable.language.wildcard.java",
|
},
|
||||||
"storage.modifier.package.java"
|
{
|
||||||
],
|
"name": "this.self",
|
||||||
"settings": {
|
"scope": "variable.language",
|
||||||
"foreground": "#000000"
|
"settings": {
|
||||||
}
|
"foreground": "#0000ff"
|
||||||
},
|
}
|
||||||
{
|
}
|
||||||
"name": "this.self",
|
],
|
||||||
"scope": "variable.language",
|
"semanticHighlighting": true,
|
||||||
"settings": {
|
"semanticTokenColors": {
|
||||||
"foreground": "#0000ff"
|
"newOperator": "#0000ff",
|
||||||
}
|
"stringLiteral": "#a31515",
|
||||||
}
|
"customLiteral": "#000000",
|
||||||
],
|
"numberLiteral": "#098658"
|
||||||
"semanticHighlighting": true,
|
}
|
||||||
"semanticTokenColors": {
|
|
||||||
"newOperator": "#0000ff",
|
|
||||||
"stringLiteral": "#a31515",
|
|
||||||
"customLiteral": "#000000",
|
|
||||||
"numberLiteral": "#098658"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export async function getTheme() {
|
|||||||
const filename = `${defaultThemes[colorTheme]}.json`
|
const filename = `${defaultThemes[colorTheme]}.json`
|
||||||
currentTheme = await fs.readFile(
|
currentTheme = await fs.readFile(
|
||||||
path.join(getExtensionUri().fsPath, "src", "integrations", "theme", "default-themes", filename),
|
path.join(getExtensionUri().fsPath, "src", "integrations", "theme", "default-themes", filename),
|
||||||
"utf-8"
|
"utf-8",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ export async function getTheme() {
|
|||||||
if (parsed.include) {
|
if (parsed.include) {
|
||||||
const includeThemeString = await fs.readFile(
|
const includeThemeString = await fs.readFile(
|
||||||
path.join(getExtensionUri().fsPath, "src", "integrations", "theme", "default-themes", parsed.include),
|
path.join(getExtensionUri().fsPath, "src", "integrations", "theme", "default-themes", parsed.include),
|
||||||
"utf-8"
|
"utf-8",
|
||||||
)
|
)
|
||||||
const includeTheme = parseThemeString(includeThemeString)
|
const includeTheme = parseThemeString(includeThemeString)
|
||||||
parsed = mergeJson(parsed, includeTheme)
|
parsed = mergeJson(parsed, includeTheme)
|
||||||
@@ -77,8 +77,8 @@ export async function getTheme() {
|
|||||||
["vs", "hc-black"].includes(converted.base)
|
["vs", "hc-black"].includes(converted.base)
|
||||||
? converted.base
|
? converted.base
|
||||||
: colorTheme.includes("Light")
|
: colorTheme.includes("Light")
|
||||||
? "vs"
|
? "vs"
|
||||||
: "vs-dark"
|
: "vs-dark"
|
||||||
) as any
|
) as any
|
||||||
|
|
||||||
return converted
|
return converted
|
||||||
@@ -93,7 +93,7 @@ export function mergeJson(
|
|||||||
first: JsonObject,
|
first: JsonObject,
|
||||||
second: JsonObject,
|
second: JsonObject,
|
||||||
mergeBehavior?: "merge" | "overwrite",
|
mergeBehavior?: "merge" | "overwrite",
|
||||||
mergeKeys?: { [key: string]: (a: any, b: any) => boolean }
|
mergeKeys?: { [key: string]: (a: any, b: any) => boolean },
|
||||||
): any {
|
): any {
|
||||||
const copyOfFirst = JSON.parse(JSON.stringify(first))
|
const copyOfFirst = JSON.parse(JSON.stringify(first))
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class WorkspaceTracker {
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
event.files.map(async (file) => {
|
event.files.map(async (file) => {
|
||||||
await this.addFilePath(file.fsPath)
|
await this.addFilePath(file.fsPath)
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
this.workspaceDidUpdate()
|
this.workspaceDidUpdate()
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ class WorkspaceTracker {
|
|||||||
if (await this.removeFilePath(file.fsPath)) {
|
if (await this.removeFilePath(file.fsPath)) {
|
||||||
updated = true
|
updated = true
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
if (updated) {
|
if (updated) {
|
||||||
this.workspaceDidUpdate()
|
this.workspaceDidUpdate()
|
||||||
@@ -76,7 +76,7 @@ class WorkspaceTracker {
|
|||||||
event.files.map(async (file) => {
|
event.files.map(async (file) => {
|
||||||
await this.removeFilePath(file.oldUri.fsPath)
|
await this.removeFilePath(file.oldUri.fsPath)
|
||||||
await this.addFilePath(file.newUri.fsPath)
|
await this.addFilePath(file.newUri.fsPath)
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
this.workspaceDidUpdate()
|
this.workspaceDidUpdate()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export class BrowserSession {
|
|||||||
async doAction(action: (page: Page) => Promise<void>): Promise<BrowserActionResult> {
|
async doAction(action: (page: Page) => Promise<void>): Promise<BrowserActionResult> {
|
||||||
if (!this.page) {
|
if (!this.page) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Browser is not launched. This may occur if the browser was automatically closed by a non-`browser_action` tool."
|
"Browser is not launched. This may occur if the browser was automatically closed by a non-`browser_action` tool.",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export async function regexSearchFiles(
|
|||||||
cwd: string,
|
cwd: string,
|
||||||
directoryPath: string,
|
directoryPath: string,
|
||||||
regex: string,
|
regex: string,
|
||||||
filePattern?: string
|
filePattern?: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const vscodeAppRoot = vscode.env.appRoot
|
const vscodeAppRoot = vscode.env.appRoot
|
||||||
const rgPath = await getBinPath(vscodeAppRoot)
|
const rgPath = await getBinPath(vscodeAppRoot)
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import * as assert from 'assert';
|
import * as assert from "assert"
|
||||||
|
|
||||||
// You can import and use all API from the 'vscode' module
|
// You can import and use all API from the 'vscode' module
|
||||||
// as well as import your extension to test it
|
// as well as import your extension to test it
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from "vscode"
|
||||||
// import * as myExtension from '../../extension';
|
// import * as myExtension from '../../extension';
|
||||||
|
|
||||||
suite('Extension Test Suite', () => {
|
suite("Extension Test Suite", () => {
|
||||||
vscode.window.showInformationMessage('Start all tests.');
|
vscode.window.showInformationMessage("Start all tests.")
|
||||||
|
|
||||||
test('Sample test', () => {
|
test("Sample test", () => {
|
||||||
assert.strictEqual(-1, [1, 2, 3].indexOf(5));
|
assert.strictEqual(-1, [1, 2, 3].indexOf(5))
|
||||||
assert.strictEqual(-1, [1, 2, 3].indexOf(0));
|
assert.strictEqual(-1, [1, 2, 3].indexOf(0))
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export function calculateApiCost(
|
|||||||
inputTokens: number,
|
inputTokens: number,
|
||||||
outputTokens: number,
|
outputTokens: number,
|
||||||
cacheCreationInputTokens?: number,
|
cacheCreationInputTokens?: number,
|
||||||
cacheReadInputTokens?: number
|
cacheReadInputTokens?: number,
|
||||||
): number {
|
): number {
|
||||||
const modelCacheWritesPrice = modelInfo.cacheWritesPrice
|
const modelCacheWritesPrice = modelInfo.cacheWritesPrice
|
||||||
let cacheWritesCost = 0
|
let cacheWritesCost = 0
|
||||||
|
|||||||
42010
webview-ui/package-lock.json
generated
42010
webview-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,57 +1,57 @@
|
|||||||
{
|
{
|
||||||
"name": "webview-ui",
|
"name": "webview-ui",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/jest-dom": "^5.17.0",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"@types/jest": "^27.5.2",
|
"@types/jest": "^27.5.2",
|
||||||
"@types/node": "^16.18.101",
|
"@types/node": "^16.18.101",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"@vscode/webview-ui-toolkit": "^1.4.0",
|
"@vscode/webview-ui-toolkit": "^1.4.0",
|
||||||
"debounce": "^2.1.1",
|
"debounce": "^2.1.1",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-remark": "^2.1.0",
|
"react-remark": "^2.1.0",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "5.0.1",
|
||||||
"react-textarea-autosize": "^8.5.3",
|
"react-textarea-autosize": "^8.5.3",
|
||||||
"react-use": "^17.5.1",
|
"react-use": "^17.5.1",
|
||||||
"react-virtuoso": "^4.7.13",
|
"react-virtuoso": "^4.7.13",
|
||||||
"rehype-highlight": "^7.0.0",
|
"rehype-highlight": "^7.0.0",
|
||||||
"rewire": "^7.0.0",
|
"rewire": "^7.0.0",
|
||||||
"styled-components": "^6.1.13",
|
"styled-components": "^6.1.13",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "node ./scripts/build-react-no-split.js",
|
"build": "node ./scripts/build-react-no-split.js",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"react-app",
|
||||||
"react-app/jest"
|
"react-app/jest"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
">0.2%",
|
">0.2%",
|
||||||
"not dead",
|
"not dead",
|
||||||
"not op_mini all"
|
"not op_mini all"
|
||||||
],
|
],
|
||||||
"development": [
|
"development": [
|
||||||
"last 1 chrome version",
|
"last 1 chrome version",
|
||||||
"last 1 firefox version",
|
"last 1 firefox version",
|
||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/vscode-webview": "^1.57.5"
|
"@types/vscode-webview": "^1.57.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta name="description" content="Web site created using create-react-app" />
|
||||||
name="description"
|
<!--
|
||||||
content="Web site created using create-react-app"
|
|
||||||
/>
|
|
||||||
<!--
|
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
-->
|
-->
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
<!--
|
<!--
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
Only files inside the `public` folder can be referenced from the HTML.
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
@@ -23,12 +20,12 @@
|
|||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>React App</title>
|
<title>React App</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<!--
|
<!--
|
||||||
This HTML file is a template.
|
This HTML file is a template.
|
||||||
If you open it directly in the browser, you will see an empty page.
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
@@ -37,6 +34,5 @@
|
|||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
-->
|
--></body>
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "React App",
|
||||||
"name": "Create React App Sample",
|
"name": "Create React App Sample",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "",
|
"src": "",
|
||||||
"sizes": "64x64 32x32 24x24 16x16",
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
"type": "image/x-icon"
|
"type": "image/x-icon"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "",
|
"src": "",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "192x192"
|
"sizes": "192x192"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "",
|
"src": "",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "512x512"
|
"sizes": "512x512"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#000000",
|
"theme_color": "#000000",
|
||||||
"background_color": "#ffffff"
|
"background_color": "#ffffff"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
|
|||||||
nextActionMessages.length > 0
|
nextActionMessages.length > 0
|
||||||
? {
|
? {
|
||||||
messages: [...nextActionMessages],
|
messages: [...nextActionMessages],
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
|
|||||||
nextActionMessages.length > 0
|
nextActionMessages.length > 0
|
||||||
? {
|
? {
|
||||||
messages: [...nextActionMessages],
|
messages: [...nextActionMessages],
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -167,13 +167,13 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
|
|||||||
mousePosition: currentPage?.currentState.mousePosition || latestState.mousePosition || "700,400",
|
mousePosition: currentPage?.currentState.mousePosition || latestState.mousePosition || "700,400",
|
||||||
consoleLogs: currentPage?.currentState.consoleLogs,
|
consoleLogs: currentPage?.currentState.consoleLogs,
|
||||||
screenshot: currentPage?.currentState.screenshot || latestState.screenshot,
|
screenshot: currentPage?.currentState.screenshot || latestState.screenshot,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
url: currentPage?.currentState.url || initialUrl,
|
url: currentPage?.currentState.url || initialUrl,
|
||||||
mousePosition: currentPage?.currentState.mousePosition || "700,400",
|
mousePosition: currentPage?.currentState.mousePosition || "700,400",
|
||||||
consoleLogs: currentPage?.currentState.consoleLogs,
|
consoleLogs: currentPage?.currentState.consoleLogs,
|
||||||
screenshot: currentPage?.currentState.screenshot,
|
screenshot: currentPage?.currentState.screenshot,
|
||||||
}
|
}
|
||||||
|
|
||||||
const [actionContent, { height: actionHeight }] = useSize(
|
const [actionContent, { height: actionHeight }] = useSize(
|
||||||
<div>
|
<div>
|
||||||
@@ -188,7 +188,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
|
|||||||
{!isBrowsing && messages.some((m) => m.say === "browser_action_result") && currentPageIndex === 0 && (
|
{!isBrowsing && messages.some((m) => m.say === "browser_action_result") && currentPageIndex === 0 && (
|
||||||
<BrowserActionBox action={"launch"} text={initialUrl} />
|
<BrowserActionBox action={"launch"} text={initialUrl} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>,
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -381,7 +381,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Height change effect
|
// Height change effect
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const ChatRow = memo(
|
|||||||
padding: "10px 6px 10px 15px",
|
padding: "10px 6px 10px 15px",
|
||||||
}}>
|
}}>
|
||||||
<ChatRowContent {...props} />
|
<ChatRowContent {...props} />
|
||||||
</div>
|
</div>,
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -55,7 +55,7 @@ const ChatRow = memo(
|
|||||||
return chatrow
|
return chatrow
|
||||||
},
|
},
|
||||||
// memo does shallow comparison of props, so we need to do deep comparison of arrays/objects whose properties might change
|
// memo does shallow comparison of props, so we need to do deep comparison of arrays/objects whose properties might change
|
||||||
deepEqual
|
deepEqual,
|
||||||
)
|
)
|
||||||
|
|
||||||
export default ChatRow
|
export default ChatRow
|
||||||
@@ -707,9 +707,7 @@ export const ChatRowContent = ({
|
|||||||
padding: `2px 8px ${isExpanded ? 0 : 8}px 8px`,
|
padding: `2px 8px ${isExpanded ? 0 : 8}px 8px`,
|
||||||
}}>
|
}}>
|
||||||
<span
|
<span
|
||||||
className={`codicon codicon-chevron-${
|
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}></span>
|
||||||
isExpanded ? "down" : "right"
|
|
||||||
}`}></span>
|
|
||||||
<span style={{ fontSize: "0.8em" }}>Command Output</span>
|
<span style={{ fontSize: "0.8em" }}>Command Output</span>
|
||||||
</div>
|
</div>
|
||||||
{isExpanded && <CodeBlock source={`${"```"}shell\n${output}\n${"```"}`} />}
|
{isExpanded && <CodeBlock source={`${"```"}shell\n${output}\n${"```"}`} />}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
shouldDisableImages,
|
shouldDisableImages,
|
||||||
onHeightChange,
|
onHeightChange,
|
||||||
},
|
},
|
||||||
ref
|
ref,
|
||||||
) => {
|
) => {
|
||||||
const { filePaths } = useExtensionState()
|
const { filePaths } = useExtensionState()
|
||||||
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
|
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
|
||||||
@@ -119,7 +119,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
const { newValue, mentionIndex } = insertMention(
|
const { newValue, mentionIndex } = insertMention(
|
||||||
textAreaRef.current.value,
|
textAreaRef.current.value,
|
||||||
cursorPosition,
|
cursorPosition,
|
||||||
insertValue
|
insertValue,
|
||||||
)
|
)
|
||||||
|
|
||||||
setInputValue(newValue)
|
setInputValue(newValue)
|
||||||
@@ -137,7 +137,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[setInputValue, cursorPosition]
|
[setInputValue, cursorPosition],
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleKeyDown = useCallback(
|
const handleKeyDown = useCallback(
|
||||||
@@ -163,14 +163,14 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
const selectableOptions = options.filter(
|
const selectableOptions = options.filter(
|
||||||
(option) =>
|
(option) =>
|
||||||
option.type !== ContextMenuOptionType.URL &&
|
option.type !== ContextMenuOptionType.URL &&
|
||||||
option.type !== ContextMenuOptionType.NoResults
|
option.type !== ContextMenuOptionType.NoResults,
|
||||||
)
|
)
|
||||||
|
|
||||||
if (selectableOptions.length === 0) return -1 // No selectable options
|
if (selectableOptions.length === 0) return -1 // No selectable options
|
||||||
|
|
||||||
// Find the index of the next selectable option
|
// Find the index of the next selectable option
|
||||||
const currentSelectableIndex = selectableOptions.findIndex(
|
const currentSelectableIndex = selectableOptions.findIndex(
|
||||||
(option) => option === options[prevIndex]
|
(option) => option === options[prevIndex],
|
||||||
)
|
)
|
||||||
|
|
||||||
const newSelectableIndex =
|
const newSelectableIndex =
|
||||||
@@ -252,7 +252,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
setInputValue,
|
setInputValue,
|
||||||
justDeletedSpaceAfterMention,
|
justDeletedSpaceAfterMention,
|
||||||
queryItems,
|
queryItems,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
@@ -285,7 +285,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
setSelectedMenuIndex(-1)
|
setSelectedMenuIndex(-1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[setInputValue]
|
[setInputValue],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -370,7 +370,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[shouldDisableImages, setSelectedImages, cursorPosition, setInputValue, inputValue]
|
[shouldDisableImages, setSelectedImages, cursorPosition, setInputValue, inputValue],
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleThumbnailsHeightChange = useCallback((height: number) => {
|
const handleThumbnailsHeightChange = useCallback((height: number) => {
|
||||||
@@ -394,7 +394,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
|
|
||||||
highlightLayerRef.current.innerHTML = text
|
highlightLayerRef.current.innerHTML = text
|
||||||
.replace(/\n$/, "\n\n")
|
.replace(/\n$/, "\n\n")
|
||||||
.replace(/[<>&]/g, (c) => ({ "<": "<", ">": ">", "&": "&" }[c] || c))
|
.replace(/[<>&]/g, (c) => ({ "<": "<", ">": ">", "&": "&" })[c] || c)
|
||||||
.replace(mentionRegexGlobal, '<mark class="mention-context-textarea-highlight">$&</mark>')
|
.replace(mentionRegexGlobal, '<mark class="mention-context-textarea-highlight">$&</mark>')
|
||||||
|
|
||||||
highlightLayerRef.current.scrollTop = textAreaRef.current.scrollTop
|
highlightLayerRef.current.scrollTop = textAreaRef.current.scrollTop
|
||||||
@@ -417,7 +417,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
updateCursorPosition()
|
updateCursorPosition()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[updateCursorPosition]
|
[updateCursorPosition],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -594,7 +594,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
export default ChatTextArea
|
export default ChatTextArea
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
disableAutoScrollRef.current = false
|
disableAutoScrollRef.current = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[messages.length, clineAsk]
|
[messages.length, clineAsk],
|
||||||
)
|
)
|
||||||
|
|
||||||
const startNewTask = useCallback(() => {
|
const startNewTask = useCallback(() => {
|
||||||
@@ -366,7 +366,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
const newImages = message.images ?? []
|
const newImages = message.images ?? []
|
||||||
if (newImages.length > 0) {
|
if (newImages.length > 0) {
|
||||||
setSelectedImages((prevImages) =>
|
setSelectedImages((prevImages) =>
|
||||||
[...prevImages, ...newImages].slice(0, MAX_IMAGES_PER_MESSAGE)
|
[...prevImages, ...newImages].slice(0, MAX_IMAGES_PER_MESSAGE),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -392,7 +392,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
handleSendMessage,
|
handleSendMessage,
|
||||||
handlePrimaryButtonClick,
|
handlePrimaryButtonClick,
|
||||||
handleSecondaryButtonClick,
|
handleSecondaryButtonClick,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEvent("message", handleMessage)
|
useEvent("message", handleMessage)
|
||||||
@@ -530,9 +530,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
10,
|
10,
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
),
|
),
|
||||||
[]
|
[],
|
||||||
)
|
)
|
||||||
|
|
||||||
const scrollToBottomAuto = useCallback(() => {
|
const scrollToBottomAuto = useCallback(() => {
|
||||||
@@ -594,7 +594,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[groupedMessages, expandedRows, scrollToBottomAuto, isAtBottom]
|
[groupedMessages, expandedRows, scrollToBottomAuto, isAtBottom],
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleRowHeightChange = useCallback(
|
const handleRowHeightChange = useCallback(
|
||||||
@@ -609,7 +609,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[scrollToBottomSmooth, scrollToBottomAuto]
|
[scrollToBottomSmooth, scrollToBottomAuto],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -672,7 +672,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange]
|
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({
|
|||||||
|
|
||||||
const filteredOptions = useMemo(
|
const filteredOptions = useMemo(
|
||||||
() => getContextMenuOptions(searchQuery, selectedType, queryItems),
|
() => getContextMenuOptions(searchQuery, selectedType, queryItems),
|
||||||
[searchQuery, selectedType, queryItems]
|
[searchQuery, selectedType, queryItems],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const CodeAccordian = ({
|
|||||||
}: CodeAccordianProps) => {
|
}: CodeAccordianProps) => {
|
||||||
const inferredLanguage = useMemo(
|
const inferredLanguage = useMemo(
|
||||||
() => code && (language ?? (path ? getLanguageFromPath(path) : undefined)),
|
() => code && (language ?? (path ? getLanguageFromPath(path) : undefined)),
|
||||||
[path, language, code]
|
[path, language, code],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -69,8 +69,19 @@ const StyledMarkdown = styled.div<{ forceWrap: boolean }>`
|
|||||||
}
|
}
|
||||||
|
|
||||||
background-color: ${CODE_BLOCK_BG_COLOR};
|
background-color: ${CODE_BLOCK_BG_COLOR};
|
||||||
font-family: var(--vscode-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
font-family:
|
||||||
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
var(--vscode-font-family),
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
"Open Sans",
|
||||||
|
"Helvetica Neue",
|
||||||
|
sans-serif;
|
||||||
font-size: var(--vscode-editor-font-size, var(--vscode-font-size, 12px));
|
font-size: var(--vscode-editor-font-size, var(--vscode-font-size, 12px));
|
||||||
color: var(--vscode-editor-foreground, #fff);
|
color: var(--vscode-editor-foreground, #fff);
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,23 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
VSCodeBadge,
|
VSCodeBadge,
|
||||||
VSCodeButton,
|
VSCodeButton,
|
||||||
VSCodeCheckbox,
|
VSCodeCheckbox,
|
||||||
VSCodeDataGrid,
|
VSCodeDataGrid,
|
||||||
VSCodeDataGridCell,
|
VSCodeDataGridCell,
|
||||||
VSCodeDataGridRow,
|
VSCodeDataGridRow,
|
||||||
VSCodeDivider,
|
VSCodeDivider,
|
||||||
VSCodeDropdown,
|
VSCodeDropdown,
|
||||||
VSCodeLink,
|
VSCodeLink,
|
||||||
VSCodeOption,
|
VSCodeOption,
|
||||||
VSCodePanels,
|
VSCodePanels,
|
||||||
VSCodePanelTab,
|
VSCodePanelTab,
|
||||||
VSCodePanelView,
|
VSCodePanelView,
|
||||||
VSCodeProgressRing,
|
VSCodeProgressRing,
|
||||||
VSCodeRadio,
|
VSCodeRadio,
|
||||||
VSCodeRadioGroup,
|
VSCodeRadioGroup,
|
||||||
VSCodeTag,
|
VSCodeTag,
|
||||||
VSCodeTextArea,
|
VSCodeTextArea,
|
||||||
VSCodeTextField,
|
VSCodeTextField,
|
||||||
} from "@vscode/webview-ui-toolkit/react"
|
} from "@vscode/webview-ui-toolkit/react"
|
||||||
|
|
||||||
function Demo() {
|
function Demo() {
|
||||||
@@ -81,7 +80,7 @@ function Demo() {
|
|||||||
))}
|
))}
|
||||||
</VSCodeDataGrid>
|
</VSCodeDataGrid>
|
||||||
|
|
||||||
<VSCodeTextField>
|
<VSCodeTextField>
|
||||||
<section slot="end" style={{ display: "flex", alignItems: "center" }}>
|
<section slot="end" style={{ display: "flex", alignItems: "center" }}>
|
||||||
<VSCodeButton appearance="icon" aria-label="Match Case">
|
<VSCodeButton appearance="icon" aria-label="Match Case">
|
||||||
<span className="codicon codicon-case-sensitive"></span>
|
<span className="codicon codicon-case-sensitive"></span>
|
||||||
|
|||||||
@@ -57,8 +57,19 @@ const StyledMarkdown = styled.div`
|
|||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
font-family: var(--vscode-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
font-family:
|
||||||
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
var(--vscode-font-family),
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
"Open Sans",
|
||||||
|
"Helvetica Neue",
|
||||||
|
sans-serif;
|
||||||
font-size: var(--vscode-font-size, 13px);
|
font-size: var(--vscode-font-size, 13px);
|
||||||
|
|
||||||
p,
|
p,
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ const ExportButton = ({ itemId }: { itemId: string }) => (
|
|||||||
// https://gist.github.com/evenfrost/1ba123656ded32fb7a0cd4651efd4db0
|
// https://gist.github.com/evenfrost/1ba123656ded32fb7a0cd4651efd4db0
|
||||||
export const highlight = (
|
export const highlight = (
|
||||||
fuseSearchResult: FuseResult<any>[],
|
fuseSearchResult: FuseResult<any>[],
|
||||||
highlightClassName: string = "history-item-highlight"
|
highlightClassName: string = "history-item-highlight",
|
||||||
) => {
|
) => {
|
||||||
const set = (obj: Record<string, any>, path: string, value: any) => {
|
const set = (obj: Record<string, any>, path: string, value: any) => {
|
||||||
const pathValue = path.split(".")
|
const pathValue = path.split(".")
|
||||||
|
|||||||
@@ -266,8 +266,19 @@ const DropdownItem = styled.div<{ isSelected: boolean }>`
|
|||||||
// Markdown
|
// Markdown
|
||||||
|
|
||||||
const StyledMarkdown = styled.div`
|
const StyledMarkdown = styled.div`
|
||||||
font-family: var(--vscode-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
font-family:
|
||||||
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
var(--vscode-font-family),
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
"Open Sans",
|
||||||
|
"Helvetica Neue",
|
||||||
|
sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--vscode-descriptionForeground);
|
color: var(--vscode-descriptionForeground);
|
||||||
|
|
||||||
@@ -403,5 +414,5 @@ export const ModelDescriptionMarkdown = memo(
|
|||||||
)} */}
|
)} */}
|
||||||
</StyledMarkdown>
|
</StyledMarkdown>
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
|
|||||||
config.lmStudioModelId,
|
config.lmStudioModelId,
|
||||||
config.geminiApiKey,
|
config.geminiApiKey,
|
||||||
config.openAiNativeApiKey,
|
config.openAiNativeApiKey,
|
||||||
].some((key) => key !== undefined)
|
].some((key) => key !== undefined)
|
||||||
: false
|
: false
|
||||||
setShowWelcome(!hasKey)
|
setShowWelcome(!hasKey)
|
||||||
setDidHydrateState(true)
|
setDidHydrateState(true)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement)
|
|||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App />
|
||||||
</React.StrictMode>
|
</React.StrictMode>,
|
||||||
)
|
)
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
// If you want to start measuring performance in your app, pass a function
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { mentionRegex } from "../../../src/shared/context-mentions"
|
|||||||
export function insertMention(
|
export function insertMention(
|
||||||
text: string,
|
text: string,
|
||||||
position: number,
|
position: number,
|
||||||
value: string
|
value: string,
|
||||||
): { newValue: string; mentionIndex: number } {
|
): { newValue: string; mentionIndex: number } {
|
||||||
const beforeCursor = text.slice(0, position)
|
const beforeCursor = text.slice(0, position)
|
||||||
const afterCursor = text.slice(position)
|
const afterCursor = text.slice(position)
|
||||||
@@ -62,7 +62,7 @@ export interface ContextMenuQueryItem {
|
|||||||
export function getContextMenuOptions(
|
export function getContextMenuOptions(
|
||||||
query: string,
|
query: string,
|
||||||
selectedType: ContextMenuOptionType | null = null,
|
selectedType: ContextMenuOptionType | null = null,
|
||||||
queryItems: ContextMenuQueryItem[]
|
queryItems: ContextMenuQueryItem[],
|
||||||
): ContextMenuQueryItem[] {
|
): ContextMenuQueryItem[] {
|
||||||
if (query === "") {
|
if (query === "") {
|
||||||
if (selectedType === ContextMenuOptionType.File) {
|
if (selectedType === ContextMenuOptionType.File) {
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ function fallbackTheme() {
|
|||||||
".hljs-string": "#a31515",
|
".hljs-string": "#a31515",
|
||||||
".hljs-meta .hljs-string": "#a31515",
|
".hljs-meta .hljs-string": "#a31515",
|
||||||
".hljs-params": "#001080",
|
".hljs-params": "#001080",
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
".hljs-comment": "#6A9955",
|
".hljs-comment": "#6A9955",
|
||||||
".hljs-doctag": "#569cd6",
|
".hljs-doctag": "#569cd6",
|
||||||
@@ -128,7 +128,7 @@ function fallbackTheme() {
|
|||||||
".hljs-string": "#ce9178",
|
".hljs-string": "#ce9178",
|
||||||
".hljs-meta .hljs-string": "#ce9178",
|
".hljs-meta .hljs-string": "#ce9178",
|
||||||
".hljs-params": "#9CDCFE",
|
".hljs-params": "#9CDCFE",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertTextMateToHljs(fullColorTheme: any) {
|
export function convertTextMateToHljs(fullColorTheme: any) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s
|
|||||||
|
|
||||||
export function validateModelId(
|
export function validateModelId(
|
||||||
apiConfiguration?: ApiConfiguration,
|
apiConfiguration?: ApiConfiguration,
|
||||||
openRouterModels?: Record<string, ModelInfo>
|
openRouterModels?: Record<string, ModelInfo>,
|
||||||
): string | undefined {
|
): string | undefined {
|
||||||
if (apiConfiguration) {
|
if (apiConfiguration) {
|
||||||
switch (apiConfiguration.apiProvider) {
|
switch (apiConfiguration.apiProvider) {
|
||||||
|
|||||||
Reference in New Issue
Block a user