Skip to content

Commit 22a75b3

Browse files
committed
feat: Add UI and API for shadow and A/B testing
- Add deployment test actions (create, destroy, pause, resume, stop) - Add deployment test stores and hooks - Add UI components for testing section in publish modal - Add active commits list and drafts commits list - Add test deployment filter for traces - Add API route for active test status - Update gateway handler to support deployment tests - Update commit selector UI - Add documentation for shadow and A/B testing
1 parent 015947c commit 22a75b3

File tree

31 files changed

+2651
-207
lines changed

31 files changed

+2651
-207
lines changed

apps/gateway/src/presenters/runPresenter.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import { captureException } from '$/common/tracer'
22
import {
33
AssertedStreamType,
4-
ChainStepObjectResponse,
5-
ChainStepTextResponse,
4+
ChainStepResponse,
65
RunSyncAPIResponse,
6+
StreamType,
77
} from '@latitude-data/constants'
88
import { LatitudeError } from '@latitude-data/constants/errors'
99
import { Result, TypedResult } from '@latitude-data/core/lib/Result'
1010
import { ProviderApiKey } from '@latitude-data/core/schema/models/types/ProviderApiKey'
1111
import { estimateCost } from '@latitude-data/core/services/ai/estimateCost/index'
1212

13-
type DocumentResponse = ChainStepObjectResponse | ChainStepTextResponse
14-
1513
export function v2RunPresenter(
16-
response: DocumentResponse,
14+
response: ChainStepResponse<StreamType>,
1715
): TypedResult<
1816
Omit<RunSyncAPIResponse<AssertedStreamType>, 'toolRequests'>,
1917
LatitudeError
@@ -51,7 +49,7 @@ export function runPresenter({
5149
response,
5250
provider,
5351
}: {
54-
response: DocumentResponse
52+
response: ChainStepResponse<StreamType>
5553
provider: ProviderApiKey
5654
}): TypedResult<RunSyncAPIResponse<AssertedStreamType>, LatitudeError> {
5755
const conversation = response.providerLog?.messages

0 commit comments

Comments
 (0)