-
Notifications
You must be signed in to change notification settings - Fork 9
Promote chat-workflow cutover stack to main #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
efb0172
fix(chat-workflow): persist the assistant message after a successful …
sweetmantech 5ec88cc
Merge remote-tracking branch 'origin/main' into test
sweetmantech d56aa31
feat(credits): charge credits per chat turn (atomic wallet debit + au…
sweetmantech fda1df2
Merge remote-tracking branch 'origin/main' into test
sweetmantech 86295b8
feat(chat-workflow): auto-commit + push after natural finish (#614)
sweetmantech 8dd29fa
Merge remote-tracking branch 'origin/main' into test
sweetmantech 9562e6b
feat(api): migrate /api/sessions/[sessionId]/chats/[chatId] from open…
arpitgupta1214 85f7ece
Merge remote-tracking branch 'origin/main' into test
sweetmantech 977ef2c
feat(chat-workflow): persist assistant message per step (#603)
arpitgupta1214 6c6a6e4
Merge remote-tracking branch 'origin/main' into test
sweetmantech 61ebc51
feat(sessions): ensure personal repo on POST /api/sessions (#618)
sweetmantech 529c469
Merge remote-tracking branch 'origin/main' into test
sweetmantech f05b050
feat(sessions): replace body cloneUrl+branch with organizationId (#620)
sweetmantech c264b50
Merge remote-tracking branch 'origin/main' into test
sweetmantech 88bc870
feat(sessions): enhance session patching with sandbox state managemen…
ahmednahima0-beep 18a6acf
Merge remote-tracking branch 'origin/main' into test
sweetmantech ed3d425
feat(backfill): Phase 2 rooms→sessions/chats/chat_messages script (#623)
sweetmantech 49c327f
fix(backfill): store full UIMessage in chat_messages.parts (#627)
sweetmantech 290783c
Feat(api) - migrate post chat read (#624)
ahmednahima0-beep 743b066
feat(sessions): accept artistId on POST /api/sessions (#628)
arpitgupta1214 94821f6
feat(api): migrate GET /api/chats to session-scoped shape (#626)
arpitgupta1214 a8c91b0
feat(backfill): include artist_id in session migration (#629)
ahmednahima0-beep 0f8bdf1
feat(chats): exclude archived sessions from GET /api/chats (#630)
arpitgupta1214 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { NextRequest, NextResponse } from "next/server"; | ||
| import { getCorsHeaders } from "@/lib/networking/getCorsHeaders"; | ||
| import { markChatReadHandler } from "@/lib/sessions/chats/markChatReadHandler"; | ||
|
|
||
| /** | ||
| * OPTIONS handler for CORS preflight requests. | ||
| * | ||
| * @returns A NextResponse with CORS headers. | ||
| */ | ||
| export async function OPTIONS() { | ||
| return new NextResponse(null, { | ||
| status: 200, | ||
| headers: getCorsHeaders(), | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * POST /api/sessions/{sessionId}/chats/{chatId}/read | ||
| * | ||
| * Marks a chat as read for the authenticated account. Authenticates via | ||
| * Privy Bearer token or x-api-key header. | ||
| * | ||
| * @param request - The incoming request. | ||
| * @param options - Route options containing the async params. | ||
| * @param options.params - Route params containing sessionId and chatId. | ||
| * @returns A NextResponse with `{ success: true }` on 200, or an error. | ||
| */ | ||
| export async function POST( | ||
| request: NextRequest, | ||
| options: { params: Promise<{ sessionId: string; chatId: string }> }, | ||
| ) { | ||
| const { sessionId, chatId } = await options.params; | ||
| return markChatReadHandler(request, sessionId, chatId); | ||
| } | ||
|
|
||
| export const dynamic = "force-dynamic"; | ||
| export const fetchCache = "force-no-store"; | ||
| export const revalidate = 0; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: JSDoc claims
artist_account_idis "ignored", but the implementation still actively filters on it. This mismatch will mislead API consumers into thinking the parameter is a no-op when it actually scopes results to a specific artist context.Prompt for AI agents