@iloveagents/foundry-agent 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @iloveagents/foundry-agent
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8184a8c: shell: URL is authoritative for the runtime threadId — fixes
8
+ resume-creates-new-conversation race
9
+
10
+ `ChatConversationAwareRuntime` previously computed
11
+ `effectiveThreadId = sticky ?? urlMatch ?? freshIdRef.current`.
12
+ When the user navigated from one chat to another via a Recents
13
+ click, the synchronous render that followed the URL change had:
14
+ - `urlMatch = B` (read from the now-updated `useLocation`)
15
+ - `sticky = A` (the active-chat-store hadn't been updated by
16
+ `useTrackActiveChatFromUrl`'s `useEffect` yet — effects run
17
+ AFTER the commit phase)
18
+
19
+ `sticky ?? urlMatch` picked `A` (the previous chat). The AG-UI
20
+ adapter was constructed with `threadId = A`. The first message the
21
+ user sent went to `/api/agent` with `thread_id = A`, the middleware
22
+ created a new row keyed by `A`... wait actually no, here's what
23
+ happens — the runtime mints a fresh runner UUID when given a
24
+ mismatched threadId; that fresh UUID became a new conversation row,
25
+ appearing as "Untitled chat" at the top of the sidebar while the
26
+ URL still said `/chat/B`. Two active-looking dots: one for `B`
27
+ (NavLink URL match), one for the new row (statusDot from the
28
+ updated active-chat-store after the lazy ensure ran).
29
+
30
+ Swap the priority: `urlMatch ?? sticky ?? freshIdRef.current`. The
31
+ URL is authoritative whenever it's set (i.e. on `/chat/<id>`
32
+ routes), eliminating the stale-sticky race entirely. `sticky` is
33
+ still consulted as the second-priority fallback for non-chat
34
+ routes (`/spaces`, `/tasks`) so the popout chat stays "live" while
35
+ the user browses workspaces — that's the original purpose of
36
+ `useStickyConversationId` and it's preserved.
37
+
3
38
  ## 0.2.1
4
39
 
5
40
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iloveagents/foundry-agent",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "types": "./src/index.ts",