feat(chatd): use last assistant message as push notification summary (#22671)

Instead of the static 'Agent has finished running.' text, extract a
summary from the last assistant message to give users meaningful context
about what the agent accomplished. Falls back to the static text if no
suitable message is found.

Co-authored-by: Kyle Carberry <kyle@carberry.com>
This commit is contained in:
Danielle Maywood
2026-03-10 15:14:15 +00:00
committed by GitHub
co-authored by Kyle Carberry
parent 12bdbc693f
commit 6489d6f714
10 changed files with 347 additions and 56 deletions
+15
View File
@@ -2587,6 +2587,21 @@ func (mr *MockStoreMockRecorder) GetInboxNotificationsByUserID(ctx, arg any) *go
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInboxNotificationsByUserID", reflect.TypeOf((*MockStore)(nil).GetInboxNotificationsByUserID), ctx, arg)
}
// GetLastChatMessageByRole mocks base method.
func (m *MockStore) GetLastChatMessageByRole(ctx context.Context, arg database.GetLastChatMessageByRoleParams) (database.ChatMessage, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLastChatMessageByRole", ctx, arg)
ret0, _ := ret[0].(database.ChatMessage)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLastChatMessageByRole indicates an expected call of GetLastChatMessageByRole.
func (mr *MockStoreMockRecorder) GetLastChatMessageByRole(ctx, arg any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastChatMessageByRole", reflect.TypeOf((*MockStore)(nil).GetLastChatMessageByRole), ctx, arg)
}
// GetLastUpdateCheck mocks base method.
func (m *MockStore) GetLastUpdateCheck(ctx context.Context) (string, error) {
m.ctrl.T.Helper()