build(prompts-core): bundle markdown prompt variants
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||
"@oh-my-opencode/hashline-core": "workspace:*",
|
||||
"@oh-my-opencode/model-core": "workspace:*",
|
||||
"@oh-my-opencode/prompts-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[test]
|
||||
preload = ["./test-setup.ts"]
|
||||
pathIgnorePatterns = ["packages/web/**", "packages/lsp-tools-mcp/**"]
|
||||
|
||||
[loader]
|
||||
".md" = "text"
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||
"@oh-my-opencode/hashline-core": "workspace:*",
|
||||
"@oh-my-opencode/model-core": "workspace:*",
|
||||
"@oh-my-opencode/prompts-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { VariantTable } from "./types"
|
||||
import defaultPrompt from "../prompts/atlas/default.md"
|
||||
import geminiPrompt from "../prompts/atlas/gemini.md"
|
||||
import gptPrompt from "../prompts/atlas/gpt.md"
|
||||
import kimiPrompt from "../prompts/atlas/kimi.md"
|
||||
import opus47Prompt from "../prompts/atlas/opus-4-7.md"
|
||||
|
||||
export const atlasPromptVariants = {
|
||||
"opus-4-7": {
|
||||
kind: "bundled",
|
||||
content: opus47Prompt,
|
||||
filePath: "packages/prompts-core/prompts/atlas/opus-4-7.md",
|
||||
},
|
||||
gpt: {
|
||||
kind: "bundled",
|
||||
content: gptPrompt,
|
||||
filePath: "packages/prompts-core/prompts/atlas/gpt.md",
|
||||
},
|
||||
gemini: {
|
||||
kind: "bundled",
|
||||
content: geminiPrompt,
|
||||
filePath: "packages/prompts-core/prompts/atlas/gemini.md",
|
||||
},
|
||||
kimi: {
|
||||
kind: "bundled",
|
||||
content: kimiPrompt,
|
||||
filePath: "packages/prompts-core/prompts/atlas/kimi.md",
|
||||
},
|
||||
default: {
|
||||
kind: "bundled",
|
||||
content: defaultPrompt,
|
||||
filePath: "packages/prompts-core/prompts/atlas/default.md",
|
||||
},
|
||||
} satisfies VariantTable
|
||||
@@ -1,11 +1,17 @@
|
||||
export type {
|
||||
BundledPromptSource,
|
||||
FilesystemPromptSource,
|
||||
LoadedPrompt,
|
||||
LoadBundledPromptInput,
|
||||
LoadFilesystemPromptInput,
|
||||
LoadPromptInput,
|
||||
ModelVariant,
|
||||
PromptSource,
|
||||
RuntimeInjection,
|
||||
SyncRuntimeInjection,
|
||||
VariantTable,
|
||||
} from "./types"
|
||||
export { atlasPromptVariants } from "./atlas-prompts"
|
||||
export { resolveVariant } from "./variant-resolver"
|
||||
export type { ResolveVariantInput } from "./variant-resolver"
|
||||
export { loadPrompt, PromptFileNotFoundError, PromptPathTraversalError } from "./loader"
|
||||
export { loadPrompt, loadPromptSync, PromptFileNotFoundError, PromptPathTraversalError } from "./loader"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
declare module "*.md" {
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"allowArbitraryExtensions": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
declare module "*.md" {
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"allowArbitraryExtensions": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
Reference in New Issue
Block a user