Skip to content

Conversation

slothwriter
Copy link
Owner

@slothwriter slothwriter commented Oct 6, 2025

Issue #440672247 , #440671736 (session and state) and #440672181 (memory) TS examples

@slothwriter slothwriter marked this pull request as ready for review October 6, 2025 23:14
}

// --- Check Updated State ---
const updatedSession = await sessionService.getSession({ appName: appName, userId: userId, sessionId: sessionId });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const updatedSession = await sessionService.getSession({ appName, userId, sessionId });

appName: appName,
sessionService: sessionService
});
const session = await sessionService.createSession({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const session = await sessionService.createSession({ appName, userId, sessionId });

Comment on lines +298 to +301
for await (const event of runner.run({
userId: userId,
sessionId: sessionId,
newMessage: userMessage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for await (const event of runner.run({ userId, sessionId, newMessage: userMessage }))

Comment on lines +388 to +393
const session = await sessionService.createSession({
appName: appName,
userId: userId,
sessionId: sessionId,
state: { "user:login_count": 0, "task_status": "idle" }
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, we can skip the writing in the key: value style when key is the same as variable name

Comment on lines +426 to +430
const updatedSession = await sessionService.getSession({
appName: appName,
userId: userId,
sessionId: sessionId
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

};

// --- Create Event with Actions ---
const actionsWithUpdate: EventActions = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have createEventActions that do it for you but it is not exposed to the public API, do you think we need to expose it?

cc: @cornellgit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants