Skip to content

Commit 5849833

Browse files
authored
Merge pull request #251 from Opencode-DCP/refactor/flatten-prompts-directory
refactor: flatten prompts directory structure
2 parents 0962811 + 0668794 commit 5849833

File tree

9 files changed

+7
-7
lines changed

9 files changed

+7
-7
lines changed

lib/hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export function createSystemPromptHandler(
3434

3535
let promptName: string
3636
if (discardEnabled && extractEnabled) {
37-
promptName = "user/system/system-prompt-both"
37+
promptName = "system/system-prompt-both"
3838
} else if (discardEnabled) {
39-
promptName = "user/system/system-prompt-discard"
39+
promptName = "system/system-prompt-discard"
4040
} else if (extractEnabled) {
41-
promptName = "user/system/system-prompt-extract"
41+
promptName = "system/system-prompt-extract"
4242
} else {
4343
return
4444
}

lib/messages/inject.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const getNudgeString = (config: PluginConfig): string => {
1717
const extractEnabled = config.tools.extract.enabled
1818

1919
if (discardEnabled && extractEnabled) {
20-
return loadPrompt(`user/nudge/nudge-both`)
20+
return loadPrompt(`nudge/nudge-both`)
2121
} else if (discardEnabled) {
22-
return loadPrompt(`user/nudge/nudge-discard`)
22+
return loadPrompt(`nudge/nudge-discard`)
2323
} else if (extractEnabled) {
24-
return loadPrompt(`user/nudge/nudge-extract`)
24+
return loadPrompt(`nudge/nudge-extract`)
2525
}
2626
return ""
2727
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"types": "./dist/index.d.ts",
99
"scripts": {
1010
"clean": "rm -rf dist",
11-
"build": "npm run clean && tsc && cp -r lib/prompts/*.txt lib/prompts/user dist/lib/prompts/",
11+
"build": "npm run clean && tsc && cp -r lib/prompts/*.txt lib/prompts/system lib/prompts/nudge dist/lib/prompts/",
1212
"postbuild": "rm -rf dist/logs",
1313
"prepublishOnly": "npm run build",
1414
"dev": "opencode plugin dev",

0 commit comments

Comments
 (0)