File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import { search , searchRequestSchema } from "@/features/search" ;
44import { apiHandler } from "@/lib/apiHandler" ;
5- import { captureEvent } from "@/lib/posthog" ;
65import { requestBodySchemaValidationError , serviceErrorResponse } from "@/lib/serviceError" ;
76import { isServiceError } from "@/lib/utils" ;
87import { NextRequest } from "next/server" ;
@@ -21,12 +20,6 @@ export const POST = apiHandler(async (request: NextRequest) => {
2120 ...options
2221 } = parsed . data ;
2322
24- const source = request . headers . get ( 'X-Sourcebot-Client-Source' ) ?? 'unknown' ;
25- await captureEvent ( 'api_code_search_request' , {
26- source,
27- type : 'blocking' ,
28- } ) ;
29-
3023 const response = await search ( {
3124 queryType : 'string' ,
3225 query,
Original file line number Diff line number Diff line change 22
33import { streamSearch , searchRequestSchema } from '@/features/search' ;
44import { apiHandler } from '@/lib/apiHandler' ;
5- import { captureEvent } from '@/lib/posthog' ;
65import { requestBodySchemaValidationError , serviceErrorResponse } from '@/lib/serviceError' ;
76import { isServiceError } from '@/lib/utils' ;
87import { NextRequest } from 'next/server' ;
@@ -20,12 +19,6 @@ export const POST = apiHandler(async (request: NextRequest) => {
2019 ...options
2120 } = parsed . data ;
2221
23- const source = request . headers . get ( 'X-Sourcebot-Client-Source' ) ?? 'unknown' ;
24- await captureEvent ( 'api_code_search_request' , {
25- source,
26- type : 'streamed' ,
27- } ) ;
28-
2922 const stream = await streamSearch ( {
3023 queryType : 'string' ,
3124 query,
Original file line number Diff line number Diff line change @@ -297,10 +297,6 @@ export type PosthogEventMap = {
297297 //////////////////////////////////////////////////////////////////
298298 wa_repo_not_found_for_zoekt_file : { } ,
299299 //////////////////////////////////////////////////////////////////
300- api_code_search_request : {
301- source : string ;
302- type : 'streamed' | 'blocking' ;
303- } ,
304300 api_request : {
305301 path : string ;
306302 source : string ;
You can’t perform that action at this time.
0 commit comments