mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Refactor theme
This commit is contained in:
@@ -36,7 +36,7 @@ webview-ui/node_modules/**
|
|||||||
!node_modules/@vscode/codicons/dist/codicon.ttf
|
!node_modules/@vscode/codicons/dist/codicon.ttf
|
||||||
|
|
||||||
# Include default themes JSON files used in getTheme
|
# Include default themes JSON files used in getTheme
|
||||||
!src/utils/default-themes/**
|
!src/integrations/theme/default-themes/**
|
||||||
|
|
||||||
# Include icons
|
# Include icons
|
||||||
!icons/**
|
!icons/**
|
||||||
@@ -9,7 +9,7 @@ import * as path from "path"
|
|||||||
import fs from "fs/promises"
|
import fs from "fs/promises"
|
||||||
import { HistoryItem } from "../../shared/HistoryItem"
|
import { HistoryItem } from "../../shared/HistoryItem"
|
||||||
import axios from "axios"
|
import axios from "axios"
|
||||||
import { getTheme } from "../../utils/getTheme"
|
import { getTheme } from "../../integrations/theme/getTheme"
|
||||||
import { openFile, openImage } from "../../utils/open-file"
|
import { openFile, openImage } from "../../utils/open-file"
|
||||||
import WorkspaceTracker from "../../integrations/WorkspaceTracker"
|
import WorkspaceTracker from "../../integrations/WorkspaceTracker"
|
||||||
import { openMention } from "../../utils/context-mentions"
|
import { openMention } from "../../utils/context-mentions"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export async function getTheme() {
|
|||||||
if (currentTheme === undefined && defaultThemes[colorTheme]) {
|
if (currentTheme === undefined && defaultThemes[colorTheme]) {
|
||||||
const filename = `${defaultThemes[colorTheme]}.json`
|
const filename = `${defaultThemes[colorTheme]}.json`
|
||||||
currentTheme = await fs.readFile(
|
currentTheme = await fs.readFile(
|
||||||
path.join(getExtensionUri().fsPath, "src", "utils", "default-themes", filename),
|
path.join(getExtensionUri().fsPath, "src", "integrations", "theme", "default-themes", filename),
|
||||||
"utf-8"
|
"utf-8"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,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", "utils", "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)
|
||||||
Reference in New Issue
Block a user