Skip to content

Commit 9401e85

Browse files
committed
move system-prompt/ to agent-runtime
1 parent f1b9712 commit 9401e85

File tree

8 files changed

+8
-145
lines changed

8 files changed

+8
-145
lines changed

backend/src/run-agent-step.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { checkLiveUserInput } from '@codebuff/agent-runtime/live-user-inputs'
22
import { getMCPToolData } from '@codebuff/agent-runtime/mcp'
33
import { getAgentStreamFromTemplate } from '@codebuff/agent-runtime/prompt-agent-stream'
4+
import { additionalSystemPrompts } from '@codebuff/agent-runtime/system-prompt/prompts'
45
import { getAgentTemplate } from '@codebuff/agent-runtime/templates/agent-registry'
56
import {
67
asSystemInstruction,
@@ -20,7 +21,6 @@ import { getErrorObject } from '@codebuff/common/util/error'
2021
import { cloneDeep } from 'lodash'
2122

2223
import { runProgrammaticStep } from './run-programmatic-step'
23-
import { additionalSystemPrompts } from './system-prompt/prompts'
2424
import { getAgentPrompt } from './templates/strings'
2525
import { processStreamWithTools } from './tools/stream-parser'
2626
import { getAgentOutput } from './util/agent-output'

backend/src/system-prompt/agent-instructions.md

Lines changed: 0 additions & 135 deletions
This file was deleted.

backend/src/templates/strings.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import {
2+
getGitChangesPrompt,
3+
getProjectFileTreePrompt,
4+
getSystemInfoPrompt,
5+
} from '@codebuff/agent-runtime/system-prompt/prompts'
16
import { getAgentTemplate } from '@codebuff/agent-runtime/templates/agent-registry'
27
import {
38
PLACEHOLDER,
@@ -10,11 +15,6 @@ import { schemaToJsonStr } from '@codebuff/common/util/zod-schema'
1015
import { z } from 'zod/v4'
1116

1217
import { buildSpawnableAgentsDescription } from './prompts'
13-
import {
14-
getGitChangesPrompt,
15-
getProjectFileTreePrompt,
16-
getSystemInfoPrompt,
17-
} from '../system-prompt/prompts'
1818
import {
1919
fullToolList,
2020
getShortToolInstructions,

backend/src/tools/definitions/tool/run-terminal-command.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { gitCommitGuidePrompt } from '@codebuff/agent-runtime/system-prompt/prompts'
12
import { getToolCallString } from '@codebuff/common/tools/utils'
23

3-
import { gitCommitGuidePrompt } from '../../../system-prompt/prompts'
4-
54
import type { ToolDescription } from '../tool-def-type'
65

76
const toolName = 'run_terminal_command'

backend/src/tools/handlers/tool/find-files.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import {
33
requestRelevantFilesForTraining,
44
} from '@codebuff/agent-runtime/find-files/request-files-prompt'
55
import { getFileReadingUpdates } from '@codebuff/agent-runtime/get-file-reading-updates'
6+
import { getSearchSystemPrompt } from '@codebuff/agent-runtime/system-prompt/search-system-prompt'
67
import { renderReadFilesResult } from '@codebuff/agent-runtime/util/render-read-files-result'
78
import {
89
countTokens,
910
countTokensJson,
1011
} from '@codebuff/agent-runtime/util/token-counter'
1112
import { insertTrace } from '@codebuff/bigquery'
1213

13-
import { getSearchSystemPrompt } from '../../../system-prompt/search-system-prompt'
14-
1514
import type { CodebuffToolHandlerFunction } from '@codebuff/agent-runtime/tools/handlers/handler-function-type'
1615
import type { GetExpandedFileContextForTrainingBlobTrace } from '@codebuff/bigquery'
1716
import type {
File renamed without changes.

backend/src/system-prompt/search-system-prompt.ts renamed to packages/agent-runtime/src/system-prompt/search-system-prompt.ts

File renamed without changes.

backend/src/system-prompt/truncate-file-tree.ts renamed to packages/agent-runtime/src/system-prompt/truncate-file-tree.ts

File renamed without changes.

0 commit comments

Comments
 (0)