Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/unit_test/test_web_typed_api_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ def test_phase1_fe_complete_identity_auth_admin_audit_adapter_boundary():
bot_client_api = (REPO_ROOT / "web/src/features/bot/client-api.ts").read_text()
assert "uploadChatDocument" in bot_client_api
assert "getChatDocument" in bot_client_api
assert "'/api/v1/chats/{chat_id}/documents'" in bot_client_api
assert "'/api/v2/chats/{chat_id}/documents'" in bot_client_api

# feature-visibility.ts — document residual swaps
# `RebuildIndexesRequestIndexTypesEnum` → `DOCUMENT_INDEX_TYPES`.
Expand Down
10 changes: 5 additions & 5 deletions web/src/api-v2/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/chats/{chat_id}/feedback": {
"/api/v2/chats/{chat_id}/feedback": {
parameters: {
query?: never;
header?: never;
Expand All @@ -1305,7 +1305,7 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/chats/{chat_id}/turns/{turn_id}/feedback": {
"/api/v2/chats/{chat_id}/turns/{turn_id}/feedback": {
parameters: {
query?: never;
header?: never;
Expand All @@ -1323,7 +1323,7 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/chats/{chat_id}/search": {
"/api/v2/chats/{chat_id}/search": {
parameters: {
query?: never;
header?: never;
Expand All @@ -1343,7 +1343,7 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/chats/{chat_id}/documents": {
"/api/v2/chats/{chat_id}/documents": {
parameters: {
query?: never;
header?: never;
Expand All @@ -1363,7 +1363,7 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/chats/{chat_id}/documents/{document_id}": {
"/api/v2/chats/{chat_id}/documents/{document_id}": {
parameters: {
query?: never;
header?: never;
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/chat/chat-messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { ChatInput, ChatInputSubmitParams } from './chat-input';
import { MessagePartsAi } from './message-parts-ai';
import { MessagePartsUser } from './message-parts-user';

const API_BASE_PATH = `${process.env.NEXT_PUBLIC_BASE_PATH || ''}/api/v1`;
const API_BASE_PATH = `${process.env.NEXT_PUBLIC_BASE_PATH || ''}/api/v2`;
const AGENT_RUNTIME_BASE_PATH = `${process.env.NEXT_PUBLIC_BASE_PATH || ''}/api/v2/agent`;
const ACTIVE_TURN_STORAGE_PREFIX = 'agent-runtime-v3:active-turn:';

Expand Down
6 changes: 3 additions & 3 deletions web/src/features/bot/client-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export async function generateBotChatTitle(
}

// Chat document attachment (for chat-input.tsx). Thin typed wrap of
// `/api/v1/chats/{chat_id}/documents` (POST multipart upload +
// `/api/v2/chats/{chat_id}/documents` (POST multipart upload +
// GET {document_id} status poll). Lives in bot feature because chats are
// owned by the bot domain; no separate features/chat/* surface per
// design-lock msg=5f0a370b decision 2d.
Expand All @@ -183,7 +183,7 @@ export async function uploadChatDocument(
file: File,
): Promise<Document> {
const { data } = await browserApiClient.POST(
'/api/v1/chats/{chat_id}/documents',
'/api/v2/chats/{chat_id}/documents',
{
params: { path: { chat_id: chatId } },
body: { file: file as unknown as string },
Expand All @@ -205,7 +205,7 @@ export async function getChatDocument(
documentId: string,
): Promise<Document> {
const { data } = await browserApiClient.GET(
'/api/v1/chats/{chat_id}/documents/{document_id}',
'/api/v2/chats/{chat_id}/documents/{document_id}',
{
params: { path: { chat_id: chatId, document_id: documentId } },
},
Expand Down
Loading