-
Notifications
You must be signed in to change notification settings - Fork 1
Introduce per thread url structure slg 71 #130
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
Open
aryadhruv
wants to merge
24
commits into
main
Choose a base branch
from
introduce-per-thread-url-structure2-slg-71
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Chat components now accept and use the full thread object instead of just threadId, enabling loading of existing messages on mount. ChatMessages uses VirtualList for efficient rendering of large message lists. Updated client and page logic to pass and handle thread objects throughout.
Moved thread message conversion from Chat.svelte into new utility functions convertThreadMessage and convertThreadMessages in utils.ts. This improves code reuse and clarity when loading existing messages from a thread.
Ensures that final_answer_started is set to true if existing messages are loaded, indicating that the final answer has already started. This improves chat state consistency when restoring previous threads.
Added MAX_MESSAGES_TO_LOAD constant Updated the onMount function (line 46) to use the MAX_MESSAGES_TO_LOAD constant instead of the hardcoded 100, making it easy to change the limit in one place.
1. Instant scroll to bottom - No scroll animation 2. Fade in the entire container - Content gradually appears over 400ms 3. Smooth experience - All messages display with a nice ease-in effect
1. Added ThreadValues interface to types.ts - Defines the structure of thread values with a messages property 2. Updated client.ts - Changed return type of getOrCreateThread() from Thread<DefaultValues> to Thread<ThreadValues> and added type casts 3. Updated Chat.svelte - Changed thread prop type from Thread<DefaultValues> to Thread<ThreadValues> 4. Updated +page.svelte - Changed thread state type from Thread<DefaultValues> to Thread<ThreadValues> and imported the new type
- Moved chat page to /chat/[threadID]/+page.svelte (you already did this) - Updated the page to extract threadId from route params: let threadId = $derived(page.params.threadID); - Removed the getOrCreateThread() call from page initialization - Created new /chat/+page.svelte that: - Gets or creates a thread via getOrCreateThread() - Redirects to /chat/<threadId>/ - Shows ChatLoader while processing
Run report for 31cc9369
|
| Action | Time | Status | Info | |
|---|---|---|---|---|
| ⬛️ | SetupProto(0.53.2) |
0ms | Skipped | |
| 🟩 | SyncWorkspace |
7.9ms | Passed | |
| 🟩 | SyncProject(frontend) |
0.4ms | Passed | |
| ⬛️ | SetupToolchain(node:~24) |
1.8s | Skipped | |
| 🟩 | InstallWorkspaceDeps(node:~24) |
6.4s | Passed | |
| 🟩 | RunTask(frontend:test) |
9.3s | Passed | |
| 🟩 | RunTask(frontend:build) |
34.4s | Passed | |
| 🟩 | RunTask(frontend:install-playwright) |
34.8s | Passed | |
| 🟩 | RunTask(frontend:test-e2e) |
4.7s | Passed |
Environment
OS: Linux
Matrix:
index = 1
Touched files
apps/frontend/src/lib/langgraph/client.ts
apps/frontend/src/routes/chat/+page.svelte
apps/frontend/src/routes/chat/[threadID]/+page.svelte
Run report for 31cc9369
|
| Action | Time | Status | Info | |
|---|---|---|---|---|
| ⬛️ | SetupProto(0.53.2) |
0ms | Skipped | |
| 🟩 | SyncWorkspace |
8.2ms | Passed | |
| 🟩 | SyncProject(frontend) |
0.4ms | Passed | |
| ⬛️ | SetupToolchain(node:~24) |
1.6s | Skipped | |
| 🟩 | InstallWorkspaceDeps(node:~24) |
6.6s | Passed | |
| 🟩 | RunTask(frontend:test-cov) |
12.6s | Passed | |
| 🟩 | RunTask(frontend:format) |
3.9s | Passed | |
| 🟩 | RunTask(frontend:lint) |
18.5s | Passed | |
| 🟩 | RunTask(frontend:build) |
35.4s | Passed | |
| 🟩 | RunTask(frontend:install-playwright) |
42.8s | Passed | |
| 🟩 | RunTask(frontend:test-e2e) |
5s | Passed | |
| 🟩 | RunTask(frontend:check) |
16.7s | Passed |
Environment
OS: Linux
Matrix:
index = 0
Touched files
apps/frontend/src/lib/langgraph/client.ts
apps/frontend/src/routes/chat/+page.svelte
apps/frontend/src/routes/chat/[threadID]/+page.svelte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge after #103