mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-16 16:31:56 +00:00
delete non need logs
This commit is contained in:
parent
67dc9af73d
commit
c31f5fbe19
@ -380,7 +380,6 @@ const CustomModeView = () => {
|
|||||||
leaf.view instanceof PreviewView && leaf.view.state.title === `${modeName} system prompt`
|
leaf.view instanceof PreviewView && leaf.view.state.title === `${modeName} system prompt`
|
||||||
)
|
)
|
||||||
if (existingLeaf) {
|
if (existingLeaf) {
|
||||||
console.log(existingLeaf)
|
|
||||||
app.workspace.setActiveLeaf(existingLeaf, { focus: true })
|
app.workspace.setActiveLeaf(existingLeaf, { focus: true })
|
||||||
} else {
|
} else {
|
||||||
app.workspace.getLeaf(true).setViewState({
|
app.workspace.getLeaf(true).setViewState({
|
||||||
|
|||||||
@ -35,7 +35,6 @@ export async function addCustomInstructions(
|
|||||||
mode: string,
|
mode: string,
|
||||||
options: { preferredLanguage?: string } = {},
|
options: { preferredLanguage?: string } = {},
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
console.log("addCustomInstructions this app, ", app)
|
|
||||||
const sections = []
|
const sections = []
|
||||||
|
|
||||||
// Load mode-specific rules file if mode is provided
|
// Load mode-specific rules file if mode is provided
|
||||||
|
|||||||
@ -36,10 +36,7 @@ export function getSystemPromptFilePath(cwd: string, mode: Mode): string {
|
|||||||
* If the file doesn't exist, returns an empty string
|
* If the file doesn't exist, returns an empty string
|
||||||
*/
|
*/
|
||||||
export async function loadSystemPromptFile(cwd: string, mode: Mode): Promise<string> {
|
export async function loadSystemPromptFile(cwd: string, mode: Mode): Promise<string> {
|
||||||
console.log("cwd", cwd)
|
|
||||||
console.log("mode", mode)
|
|
||||||
const filePath = getSystemPromptFilePath(cwd, mode)
|
const filePath = getSystemPromptFilePath(cwd, mode)
|
||||||
console.log("filePath", filePath)
|
|
||||||
return safeReadFile(filePath)
|
return safeReadFile(filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,6 @@ export class SystemPrompt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async ensureDirectory(): Promise<void> {
|
private async ensureDirectory(): Promise<void> {
|
||||||
console.log("this.app, ", this.app)
|
|
||||||
if (!(await this.app.vault.adapter.exists(this.dataDir))) {
|
if (!(await this.app.vault.adapter.exists(this.dataDir))) {
|
||||||
await this.app.vault.adapter.mkdir(this.dataDir)
|
await this.app.vault.adapter.mkdir(this.dataDir)
|
||||||
}
|
}
|
||||||
@ -58,7 +57,6 @@ export class SystemPrompt {
|
|||||||
private async loadSystemPromptFile(mode: Mode): Promise<string> {
|
private async loadSystemPromptFile(mode: Mode): Promise<string> {
|
||||||
const fileName = this.getSystemPromptFilePath(mode)
|
const fileName = this.getSystemPromptFilePath(mode)
|
||||||
const filePath = normalizePath(path.join(this.dataDir, fileName))
|
const filePath = normalizePath(path.join(this.dataDir, fileName))
|
||||||
console.log("filePath", filePath)
|
|
||||||
if (!(await this.app.vault.adapter.exists(filePath))) {
|
if (!(await this.app.vault.adapter.exists(filePath))) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user