mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 02:40:39 +09:00
Add default agent instructions bundle
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
0f45999df9
commit
d6bb71f324
4 changed files with 38 additions and 3 deletions
|
|
@ -56,7 +56,10 @@ import {
|
|||
import { DEFAULT_CURSOR_LOCAL_MODEL } from "@paperclipai/adapter-cursor-local";
|
||||
import { DEFAULT_GEMINI_LOCAL_MODEL } from "@paperclipai/adapter-gemini-local";
|
||||
import { ensureOpenCodeModelConfiguredAndAvailable } from "@paperclipai/adapter-opencode-local/server";
|
||||
import { loadDefaultAgentInstructionsBundle } from "../services/default-agent-instructions.js";
|
||||
import {
|
||||
loadDefaultAgentInstructionsBundle,
|
||||
resolveDefaultAgentInstructionsBundleRole,
|
||||
} from "../services/default-agent-instructions.js";
|
||||
|
||||
export function agentRoutes(db: Db) {
|
||||
const DEFAULT_INSTRUCTIONS_PATH_KEYS: Record<string, string> = {
|
||||
|
|
@ -432,8 +435,8 @@ export function agentRoutes(db: Db) {
|
|||
const promptTemplate = typeof adapterConfig.promptTemplate === "string"
|
||||
? adapterConfig.promptTemplate
|
||||
: "";
|
||||
const files = agent.role === "ceo" && promptTemplate.trim().length === 0
|
||||
? await loadDefaultAgentInstructionsBundle("ceo")
|
||||
const files = promptTemplate.trim().length === 0
|
||||
? await loadDefaultAgentInstructionsBundle(resolveDefaultAgentInstructionsBundleRole(agent.role))
|
||||
: { "AGENTS.md": promptTemplate };
|
||||
const materialized = await instructions.materializeManagedBundle(
|
||||
agent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue