Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(teamhub): read the live browser's previous page, not the asking call's empty claim
muterCa54847eabb06
diff --git a/apps/teamhub/internal/store/queries/voice_live.sql b/apps/teamhub/internal/store/queries/voice_live.sqlindex d2830cf7..fed68603 100644--- a/apps/teamhub/internal/store/queries/voice_live.sql+++ b/apps/teamhub/internal/store/queries/voice_live.sql@@ -219,10 +219,12 @@ WHERE voice_session_id=sqlc.arg(voice_session_id)::textAND turn_id=sqlc.arg(turn_id)::text AND name=sqlc.arg(name)::text;-- name: GetLatestVoiceLiveToolOutput :one--- The newest output this session returned for the tool, such as the page--- the cloud browser showed last.+-- The newest output this session returned for the tool before the call that+-- asks, such as the page the browser showed last. The asking call is already+-- claimed with no output, so it is left out.SELECT output FROM voice_live_tool_callsWHERE voice_session_id=sqlc.arg(voice_session_id)::text AND name=sqlc.arg(name)::text+ AND call_id<>sqlc.arg(call_id)::textORDER BY created_at DESC LIMIT 1;-- name: SearchVoiceLiveMessagesForAccount :manydiff --git a/apps/teamhub/internal/store/voice_live.sql.go b/apps/teamhub/internal/store/voice_live.sql.goindex b1744987..da439a3f 100644--- a/apps/teamhub/internal/store/voice_live.sql.go+++ b/apps/teamhub/internal/store/voice_live.sql.go@@ -243,18 +243,21 @@ func (q *Queries) FindVoiceLiveRoomsForAccount(ctx context.Context, arg FindVoicconst getLatestVoiceLiveToolOutput = `-- name: GetLatestVoiceLiveToolOutput :oneSELECT output FROM voice_live_tool_callsWHERE voice_session_id=$1::text AND name=$2::text+ AND call_id<>$3::textORDER BY created_at DESC LIMIT 1`type GetLatestVoiceLiveToolOutputParams struct {VoiceSessionID string `json:"voice_session_id"`Name string `json:"name"`+ CallID string `json:"call_id"`}-// The newest output this session returned for the tool, such as the page-// the cloud browser showed last.+// The newest output this session returned for the tool before the call that+// asks, such as the page the browser showed last. The asking call is already+// claimed with no output, so it is left out.func (q *Queries) GetLatestVoiceLiveToolOutput(ctx context.Context, arg GetLatestVoiceLiveToolOutputParams) (string, error) {- row := q.db.QueryRow(ctx, getLatestVoiceLiveToolOutput, arg.VoiceSessionID, arg.Name)+ row := q.db.QueryRow(ctx, getLatestVoiceLiveToolOutput, arg.VoiceSessionID, arg.Name, arg.CallID)var output stringerr := row.Scan(&output)return output, err