Skip to content
9 changes: 9 additions & 0 deletions apps/mobile/src/features/threads/ThreadFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,15 @@ function renderFeedEntry(
})}
{showAssistantMeta ? (
<View className="mt-1 flex-row items-center gap-1">
{message.actualModel ? (
<Text
accessibilityLabel={`Actual model: ${message.actualModel}`}
className="mr-1 max-w-[70%] font-t3-medium text-secondary-foreground text-xs"
numberOfLines={1}
>
Model: {message.actualModel}
</Text>
) : null}
<CopyTextButton
accessibilityLabel="Copy message"
text={renderedText}
Expand Down
5 changes: 5 additions & 0 deletions apps/server/src/orchestration/Layers/ProjectionPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,11 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
turnId: event.payload.turnId,
role: event.payload.role,
text: nextText,
...(event.payload.actualModel !== undefined
? { actualModel: event.payload.actualModel }
: previousMessage?.actualModel !== undefined
? { actualModel: previousMessage.actualModel }
: {}),
...(nextAttachments !== undefined ? { attachments: [...nextAttachments] } : {}),
...((event.payload.context ?? previousMessage?.context) !== undefined
? { context: event.payload.context ?? previousMessage?.context }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,10 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
`;
yield* sql`
INSERT INTO projection_thread_messages (
message_id, thread_id, role, text, attachments_json, context_json, is_streaming, created_at, updated_at
message_id, thread_id, role, text, actual_model, attachments_json, context_json,
is_streaming, created_at, updated_at
) VALUES (${messageId}, ${threadId}, 'user', 'Read these notes',
${attachmentsJson}, ${contextJson}, 0, ${createdAt}, ${createdAt})
'openai/gpt-5.6-sol', ${attachmentsJson}, ${contextJson}, 0, ${createdAt}, ${createdAt})
`;
yield* sql`
INSERT INTO projection_thread_messages (
Expand All @@ -840,6 +841,7 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
text: "Read these notes",
turnId: null,
streaming: false,
actualModel: "openai/gpt-5.6-sol",
createdAt,
updatedAt: createdAt,
attachments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
ThreadPullRequestSnapshot,
ThreadPullRequestStack,
type ThreadPullRequestLink,
TrimmedNonEmptyString,
} from "@t3tools/contracts";
import { legacyLinkedPullRequestOf } from "@t3tools/shared/threadPullRequests";
import * as Arr from "effect/Array";
Expand Down Expand Up @@ -112,6 +113,7 @@ const ProjectionProjectDbRowSchema = ProjectionProject.mapFields(
const ProjectionThreadMessageDbRowSchema = ProjectionThreadMessage.mapFields(
Struct.assign({
isStreaming: Schema.Number,
actualModel: Schema.NullOr(TrimmedNonEmptyString),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
attachments: Schema.NullOr(Schema.fromJsonString(Schema.Array(ChatAttachment))),
context: Schema.NullOr(Schema.fromJsonString(OrchestrationMessageContext)),
}),
Expand Down Expand Up @@ -691,6 +693,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
turn_id AS "turnId",
role,
text,
actual_model AS "actualModel",
attachments_json AS "attachments",
context_json AS "context",
is_streaming AS "isStreaming",
Expand Down Expand Up @@ -1294,6 +1297,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
turn_id AS "turnId",
role,
text,
actual_model AS "actualModel",
attachments_json AS "attachments",
context_json AS "context",
is_streaming AS "isStreaming",
Expand Down Expand Up @@ -1327,6 +1331,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
turn_id AS "turnId",
role,
text,
actual_model AS "actualModel",
attachments_json AS "attachments",
context_json AS "context",
is_streaming AS "isStreaming",
Expand Down Expand Up @@ -1740,6 +1745,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
turn_id AS "turnId",
role,
text,
actual_model AS "actualModel",
attachments_json AS "attachments",
context_json AS "context",
is_streaming AS "isStreaming",
Expand Down Expand Up @@ -2150,6 +2156,7 @@ pending_approval_requests AS (
id: row.messageId,
role: row.role,
text: row.text,
...(row.actualModel !== null ? { actualModel: row.actualModel } : {}),
...(row.attachments !== null ? { attachments: row.attachments } : {}),
...(row.context !== null ? { context: row.context } : {}),
turnId: row.turnId,
Expand Down Expand Up @@ -3277,6 +3284,7 @@ pending_approval_requests AS (
text: row.text,
turnId: row.turnId,
streaming: row.isStreaming === 1,
...(row.actualModel !== null ? { actualModel: row.actualModel } : {}),
createdAt: row.createdAt,
updatedAt: row.updatedAt,
...(row.attachments !== null ? { attachments: row.attachments } : {}),
Expand Down Expand Up @@ -3535,6 +3543,7 @@ pending_approval_requests AS (
id: row.messageId,
role: row.role,
text: row.text,
...(row.actualModel !== null ? { actualModel: row.actualModel } : {}),
turnId: row.turnId,
streaming: row.isStreaming === 1,
createdAt: row.createdAt,
Expand Down
Loading
Loading