Skip to content

Commit 4ba0db8

Browse files
committed
move agent-output to agent-runtime package
1 parent 9401e85 commit 4ba0db8

File tree

5 files changed

+6
-53
lines changed

5 files changed

+6
-53
lines changed

backend/src/run-agent-step.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { cloneDeep } from 'lodash'
2323
import { runProgrammaticStep } from './run-programmatic-step'
2424
import { getAgentPrompt } from './templates/strings'
2525
import { processStreamWithTools } from './tools/stream-parser'
26-
import { getAgentOutput } from './util/agent-output'
26+
import { getAgentOutput } from '@codebuff/agent-runtime/util/agent-output'
2727

2828
import type { AgentResponseTrace } from '@codebuff/bigquery'
2929
import type { AgentTemplate } from '@codebuff/common/types/agent-template'

backend/src/util/agent-output.ts

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

packages/agent-runtime/src/find-files/request-files-prompt.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import {
99
import { getAllFilePaths } from '@codebuff/common/project-file-tree'
1010
import { range, shuffle, uniq } from 'lodash'
1111

12+
import { promptFlashWithFallbacks } from '../llm-api/gemini-with-fallbacks'
1213
import {
1314
castAssistantMessage,
1415
messagesWithSystem,
1516
getMessagesSubset,
16-
} from '@codebuff/agent-runtime/util/messages'
17-
18-
import { promptFlashWithFallbacks } from '../llm-api/gemini-with-fallbacks'
17+
} from '../util/messages'
1918

2019
import type { TextBlock } from '../llm-api/claude'
2120
import type {

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import {
2-
countTokens,
3-
countTokensJson,
4-
} from '@codebuff/agent-runtime/util/token-counter'
51
import {
62
printFileTree,
73
printFileTreeWithTokens,
84
} from '@codebuff/common/util/file'
95
import { sampleSizeWithSeed } from '@codebuff/common/util/random'
106

7+
import { countTokens, countTokensJson } from '../util/token-counter'
8+
119
import type { Logger } from '@codebuff/common/types/contracts/logger'
1210
import type {
1311
FileTreeNode,

packages/agent-runtime/src/util/__tests__/messages.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {
1212
trimMessagesToFitTokenLimit,
1313
messagesWithSystem,
1414
getPreviouslyReadFiles,
15-
} from '@codebuff/agent-runtime/util/messages'
16-
15+
} from '../../util/messages'
1716
import * as tokenCounter from '../token-counter'
1817

1918
import type { CodebuffToolMessage } from '@codebuff/common/tools/list'

0 commit comments

Comments
 (0)