Skip to content

Commit 6a8fef5

Browse files
committed
add knowledge file update event
1 parent 6d4f5d0 commit 6a8fef5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

backend/src/main-prompt.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,16 @@ export const mainPrompt = async (
745745
// Add the plan file to the processing queue
746746
if (!fileProcessingPromisesByPath[path]) {
747747
fileProcessingPromisesByPath[path] = []
748+
if (path.endsWith('knowledge.md')) {
749+
trackEvent(AnalyticsEvent.KNOWLEDGE_FILE_UPDATED, userId ?? '', {
750+
agentStepId,
751+
clientSessionId,
752+
fingerprintId,
753+
userInputId: promptId,
754+
userId,
755+
repoName: repoId,
756+
})
757+
}
748758
}
749759
const change = {
750760
tool: 'create_plan' as const,

common/src/constants/analytics-events.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export enum AnalyticsEvent {
1010
BACKGROUND_PROCESS_START = 'cli.background_process_start',
1111
CHANGE_DIRECTORY = 'cli.change_directory',
1212
CHECKPOINT_COMMAND_USED = 'cli.checkpoint_command_used',
13+
KNOWLEDGE_FILE_UPDATED = 'cli.knowledge_file_updated',
1314
LOGIN = 'cli.login',
1415
TERMINAL_COMMAND_COMPLETED = 'cli.terminal_command_completed',
1516
MALFORMED_PROMPT_RESPONSE = 'cli.malformed_prompt_response',

0 commit comments

Comments
 (0)