summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/server.ts
diff options
context:
space:
mode:
authorowenofbrien <[email protected]>2025-07-27 16:34:39 -0500
committerGitHub <[email protected]>2025-07-27 21:34:39 +0000
commitb497791c59bc2e6ee14b0b9607adf4c3d6f09ffe (patch)
treef80107e05d131d6c3add3fdc9c12831cd8a3a193 /packages/core/src/code_assist/server.ts
parent36e1e57252c562a3a16dcbdfadf11384419a457d (diff)
Propagate user_prompt_id to GenerateConentRequest for logging (#4741)
Diffstat (limited to 'packages/core/src/code_assist/server.ts')
-rw-r--r--packages/core/src/code_assist/server.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/core/src/code_assist/server.ts b/packages/core/src/code_assist/server.ts
index 7af643f7..08339bdc 100644
--- a/packages/core/src/code_assist/server.ts
+++ b/packages/core/src/code_assist/server.ts
@@ -53,10 +53,16 @@ export class CodeAssistServer implements ContentGenerator {
async generateContentStream(
req: GenerateContentParameters,
+ userPromptId: string,
): Promise<AsyncGenerator<GenerateContentResponse>> {
const resps = await this.requestStreamingPost<CaGenerateContentResponse>(
'streamGenerateContent',
- toGenerateContentRequest(req, this.projectId, this.sessionId),
+ toGenerateContentRequest(
+ req,
+ userPromptId,
+ this.projectId,
+ this.sessionId,
+ ),
req.config?.abortSignal,
);
return (async function* (): AsyncGenerator<GenerateContentResponse> {
@@ -68,10 +74,16 @@ export class CodeAssistServer implements ContentGenerator {
async generateContent(
req: GenerateContentParameters,
+ userPromptId: string,
): Promise<GenerateContentResponse> {
const resp = await this.requestPost<CaGenerateContentResponse>(
'generateContent',
- toGenerateContentRequest(req, this.projectId, this.sessionId),
+ toGenerateContentRequest(
+ req,
+ userPromptId,
+ this.projectId,
+ this.sessionId,
+ ),
req.config?.abortSignal,
);
return fromGenerateContentResponse(resp);