ToolItems
type ToolItems = { emit: (item) => void; latest: (itemType, key?) => | { data: unknown; } | undefined; list?: () => EmittedItem[];};Defined in: shared/src/tool/tool.ts:30
Read/write access to the conversation’s items for the duration of a call.
latest resolves the current version of an identity (itemType + key);
emit appends a new version; list enumerates the current version of every
item. list is what lets a transport (e.g. HTTP) forward the caller’s item
state so latest resolves the same on the far side as it does in-process.
Properties
Section titled “Properties”emit: (item) => void;Defined in: shared/src/tool/tool.ts:32
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
item |
EmittedItem |
Returns
Section titled “Returns”void
latest
Section titled “latest”latest: (itemType, key?) => | { data: unknown;} | undefined;Defined in: shared/src/tool/tool.ts:31
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
itemType |
string |
key? |
string |
Returns
Section titled “Returns”| {
data: unknown;
}
| undefined
optional list?: () => EmittedItem[];Defined in: shared/src/tool/tool.ts:33