Commit Graph

1228 Commits

Author SHA1 Message Date
github-actions[bot] f01f84ed3e Version Packages (#1358) 2025-07-07 14:53:46 +02:00
David Duong c8d7a0aa9a fix(sdk): code hygiene (#1357) 2025-07-07 12:44:29 +00:00
David Duong 8e818724f1 feat(checkpoint-validation): migrate CLI to Vitest (#1346) 2025-07-07 13:41:14 +02:00
David Duong 5e9652f70d fix(cli): match "langsmith" package version (#1342) 2025-07-04 13:51:37 +00:00
David Duong e48b6caf37 fix(langgraph): avoid calling _emit for runs without metadata (#1340) 2025-07-04 13:36:43 +00:00
Tat Dat Duong dd80cf6f2a fix(api): use overlapped stdio for windows API tests 2025-07-04 01:19:03 +02:00
Tat Dat Duong 92ac0c7c84 2x the timeout again 2025-07-03 21:27:29 +02:00
Tat Dat Duong f5c0b5d936 Make timeouts way more slower for Windows 2025-07-03 21:18:27 +02:00
Tat Dat Duong 6c481c1018 Ensure we properly reference tsx 2025-07-03 21:07:34 +02:00
Tat Dat Duong 5b65b25c24 Shorten the TTL 2025-07-03 20:38:41 +02:00
Tat Dat Duong 084ea49b4c fix(cli): normalize paths when creating docker image 2025-07-03 20:32:26 +02:00
Tat Dat Duong 0d4b5fe0ba Fix docs build, consolidate @types/node version 2025-07-03 14:52:56 +02:00
Tat Dat Duong d29825f507 Disable file parallelism 2025-07-03 14:40:34 +02:00
Tat Dat Duong 8542079345 Expand hook timeout to 20_000 2025-07-03 14:25:56 +02:00
Tat Dat Duong f858150d6e Simplify start of server 2025-07-03 14:21:00 +02:00
Tat Dat Duong 5ff0446d9a Fix The URL must be of scheme file 2025-07-03 00:41:46 +02:00
Tat Dat Duong 85ed34c8dc Update lockfile 2025-07-03 00:33:50 +02:00
Tat Dat Duong 0055bea118 Merge branch 'main' into dqbd/lgjsapi 2025-07-03 00:29:57 +02:00
Tat Dat Duong b082ee5903 Rename from sdk-js to sdk 2025-07-02 21:26:14 +02:00
Tat Dat Duong 4295efcca7 Remove unused files 2025-07-02 21:21:32 +02:00
Tat Dat Duong d2913d89cb Make test more resilient 2025-07-02 20:54:34 +02:00
Tat Dat Duong 525a89474e Another script check 2025-07-02 20:32:41 +02:00
Tat Dat Duong a4a710f3df Fix scripts 2025-07-02 20:26:16 +02:00
Tat Dat Duong aea5b9b6c4 Dedupe Prettier 2025-07-02 20:23:21 +02:00
Tat Dat Duong 5df63ba25c Update dependencies, remove circular dependency 2025-07-02 20:20:16 +02:00
Tat Dat Duong 559b9bac3f Merge remote-tracking branch 'sdk-js/main' into dqbd/sdk-js 2025-07-02 19:56:01 +02:00
Josh Rogers 7c33aa5c45 Bump js sdk to 0.0.89 (#5313) 2025-07-02 09:56:04 -07:00
Tat Dat Duong 9329cde70b Revert change to remove 18.x, disable auth tests instead 2025-07-02 18:32:41 +02:00
Tat Dat Duong f4a65923f1 Kill server 2025-07-02 03:42:54 +02:00
Tat Dat Duong a254b5e817 Make schemas timeout 2025-07-02 02:51:02 +02:00
Tat Dat Duong 005d83facf Remove only modifier 2025-07-02 02:47:05 +02:00
Tat Dat Duong 66219801db Test 2025-07-02 02:44:04 +02:00
Tat Dat Duong 8fa640beba Update turbo definitions 2025-07-02 02:35:57 +02:00
Tat Dat Duong 799a08edc3 Simplify build process, remove Bun 2025-07-02 01:46:19 +02:00
Josh Rogers c497c8e984 Updating message types to include all base message fields (#5298) 2025-07-01 15:40:13 -07:00
Tat Dat Duong bcf06be8f7 Another pass at fixing build 2025-07-02 00:00:19 +02:00
Tat Dat Duong 2b211391c8 Update dependencies 2025-07-02 00:00:05 +02:00
Tat Dat Duong ace7c913f6 Merge remote-tracking branch 'langgraphjs-api/main' into dqbd/lgjsapi 2025-07-01 23:58:40 +02:00
David Duong e521f5f35f release(langgraph): 0.3.6 (#1326) 2025-07-01 12:45:05 +00:00
David Duong b0e9239c86 release(langgraph): 0.3.5 (#1325) 2025-07-01 12:37:59 +00:00
Tat Dat Duong 3463730b44 release(sdk-js): 0.0.88 2025-07-01 14:21:11 +02:00
David Duong d2767e827d feat(react): enhance useStream with initialValues, newThreadId, and onStop callback for improved UX (#5111) 2025-07-01 01:53:28 +02:00
Tat Dat Duong 1288696d8e Make sure to spread stream values 2025-07-01 01:39:53 +02:00
Tat Dat Duong 00550f18ea Fix non-existent assistantId 2025-07-01 01:35:59 +02:00
Tat Dat Duong 67344b3654 Fix typo 2025-07-01 01:33:08 +02:00
Tat Dat Duong 79155789f5 Cleanup 2025-07-01 01:19:07 +02:00
MauritsBrinkman 3b04510c00 test: add useStream onStop callback tests 2025-06-30 16:43:48 +02:00
MauritsBrinkman 55df97d60f feat: add onStop callback to useStream for custom stop behavior
Add onStop callback to useStream hook enabling developers to customize
UI behavior when streams are stopped. This is especially useful for
UI messages with loading states that need to show "stopped" status
instead of remaining in infinite loading state.

The callback provides the same mutate function as onCustomEvent for
immediate local state updates, while users can optionally update
server thread state using the threads client.

Example usage:
```typescript
const stream = useStream({
  assistantId: "my-assistant",
  onStop: async ({ mutate }) => {
    // Immediate UI update - stop loading components
    mutate((prev) => ({
      ...prev,
      ui: prev.ui?.map(component =>
        component.props?.isLoading
          ? {
              ...component,
              props: {
                ...component.props,
                isLoading: false,
                isStopped: true
              }
            }
          : component
      )
    }));

    // Optional server thread state update
    if (stream.threadId) {
      await stream.client.threads.updateState(stream.threadId, {
        values: {
          ui: prev.ui // persist stopped state to server
        }
      });
    }
  }
});
```

This is especially useful for cases where gen UI components have loading states,
where we don't want the loading state to persist on cancellation.
2025-06-30 16:43:13 +02:00
MauritsBrinkman a740542ce7 fix(sdk-js): convert SSE classes to factory functions to resolve tree shaking
- Convert BytesLineDecoder and SSEDecoder from classes extending TransformStream to factory functions
- Fixes tree shaking failures that prevented build completion
- Maintains identical API functionality, just removes 'new' keyword usage
- All tests continue to pass

Resolves tree shaking side effect detection issues with TransformStream extension
2025-06-30 16:43:13 +02:00
MauritsBrinkman 2613fa6b48 docs(react): add documentation and tests for initialValues and newThreadId options
- Document initialValues for cached thread display
- Document newThreadId for optimistic thread creation
- Add comprehensive test coverage for both features
2025-06-30 16:43:12 +02:00