feat: support guest session (#919)

This commit is contained in:
Jeremy 2025-04-25 23:40:15 -07:00 committed by GitHub
parent 24cb2ce19b
commit 9279135355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 741 additions and 288 deletions

View file

@ -21,7 +21,7 @@ test.describe
test('Ada can invoke chat generation', async ({ adaContext }) => {
const chatId = generateUUID();
const response = await adaContext.request.post('api/chat', {
const response = await adaContext.request.post('/api/chat', {
data: {
id: chatId,
messages: TEST_PROMPTS.SKY.MESSAGES,
@ -44,7 +44,7 @@ test.describe
}) => {
const [chatId] = chatIdsCreatedByAda;
const response = await babbageContext.request.post('api/chat', {
const response = await babbageContext.request.post('/api/chat', {
data: {
id: chatId,
messages: TEST_PROMPTS.GRASS.MESSAGES,
@ -61,7 +61,7 @@ test.describe
const [chatId] = chatIdsCreatedByAda;
const response = await babbageContext.request.delete(
`api/chat?id=${chatId}`,
`/api/chat?id=${chatId}`,
);
expect(response.status()).toBe(403);
@ -72,7 +72,9 @@ test.describe
test('Ada can delete her own chat', async ({ adaContext }) => {
const [chatId] = chatIdsCreatedByAda;
const response = await adaContext.request.delete(`api/chat?id=${chatId}`);
const response = await adaContext.request.delete(
`/api/chat?id=${chatId}`,
);
expect(response.status()).toBe(200);
const deletedChat = await response.json();