Commit 5ff4e60
fix(demo): align chat-demo with unified Message type and AgentSubmitInput
- msg.getType() === 'ai' → msg.role === 'assistant' (Message has 'role',
not BaseMessage's getType()).
- chat.submit({ messages: [{ role: 'human', content }] } as any) →
chat.submit({ message: content }) (the runtime-neutral
AgentSubmitInput shape).
- Drop unused BaseMessage import + generic.
This resolves the TS2339 error that blocked website lint/build CI.
The demo's old code path predates the unification refactor and was
reading raw LangChain types directly off the agent.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent dba611b commit 5ff4e60
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | | - | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
0 commit comments