@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
13 lines • 866 B
TypeScript
/**
* `next`, with every part structurally equal to the same part of `previous` replaced by that part
* of `previous` — `previous` itself when the two are equal throughout. Plain objects and arrays are
* compared member by member (arrays by position); anything else by `Object.is`.
*
* The chat reaches React as a fresh deep copy on every update (the AI SDK clones the streaming
* message on each chunk), so a pushed component's props and a tree's nodes are new objects on every
* token even when nothing in them changed. Run through this, an unchanged node keeps its identity
* and a memoized renderer skips it; a changed one (more props, `incomplete` → final) is new, and so
* is every ancestor of it, which is what re-renders.
*/
export declare function shareStructure<T>(previous: unknown, next: T): T;
//# sourceMappingURL=share-structure.d.ts.map