Fix post-rebase typecheck regressions
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
e6575c4149
commit
1683ee7b11
4 files changed
+8
-24
No files matched your search
@@ -6,7 +6,6 @@ import {
|
||||
type MessageId,
|
||||
type OrchestrationReadModel,
|
||||
type ProjectId,
|
||||
type ProviderSessionId,
|
||||
type ServerConfig,
|
||||
type ThreadId,
|
||||
type WsWelcomePayload,
|
||||
@@ -204,6 +203,8 @@ function createSnapshotForTargetUser(options: {
|
||||
projectId: PROJECT_ID,
|
||||
title: "Browser test thread",
|
||||
model: "gpt-5",
|
||||
interactionMode: "default",
|
||||
runtimeMode: "full-access",
|
||||
branch: "main",
|
||||
worktreePath: null,
|
||||
latestTurn: null,
|
||||
@@ -212,15 +213,13 @@ function createSnapshotForTargetUser(options: {
|
||||
deletedAt: null,
|
||||
messages,
|
||||
activities: [],
|
||||
proposedPlans: [],
|
||||
checkpoints: [],
|
||||
session: {
|
||||
threadId: THREAD_ID,
|
||||
status: "ready",
|
||||
providerName: "codex",
|
||||
providerSessionId: "session-1" as ProviderSessionId,
|
||||
providerThreadId: null,
|
||||
approvalPolicy: "on-failure",
|
||||
sandboxMode: "workspace-write",
|
||||
runtimeMode: "full-access",
|
||||
activeTurnId: null,
|
||||
lastError: null,
|
||||
updatedAt: NOW_ISO,
|
||||
@@ -552,7 +551,6 @@ describe("ChatView timeline estimator parity (full app)", () => {
|
||||
projects: [],
|
||||
threads: [],
|
||||
threadsHydrated: false,
|
||||
runtimeMode: "full-access",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -4716,20 +4716,6 @@ type TimelineRow =
|
||||
}
|
||||
| { kind: "working"; id: string; createdAt: string | null };
|
||||
|
||||
function estimateTimelineMessageHeight(message: TimelineMessage): number {
|
||||
const textLength = message.text.length;
|
||||
if (message.role === "assistant") {
|
||||
const estimatedLines = Math.max(1, Math.ceil(textLength / 72));
|
||||
return 78 + Math.min(estimatedLines * 22, 820);
|
||||
}
|
||||
|
||||
const estimatedLines = Math.max(1, Math.ceil(textLength / 56));
|
||||
const attachmentCount = message.attachments?.length ?? 0;
|
||||
const attachmentRows = Math.ceil(attachmentCount / 2);
|
||||
const attachmentHeight = attachmentRows * 124;
|
||||
return 96 + Math.min(estimatedLines * 22, 620) + attachmentHeight;
|
||||
}
|
||||
|
||||
function estimateTimelineProposedPlanHeight(proposedPlan: TimelineProposedPlan): number {
|
||||
const estimatedLines = Math.max(1, Math.ceil(proposedPlan.planMarkdown.length / 72));
|
||||
return 120 + Math.min(estimatedLines * 22, 880);
|
||||
|
||||
@@ -263,7 +263,7 @@ export const OrchestrationReadModel = Schema.Struct({
|
||||
});
|
||||
export type OrchestrationReadModel = typeof OrchestrationReadModel.Type;
|
||||
|
||||
const ProjectCreateCommand = Schema.Struct({
|
||||
export const ProjectCreateCommand = Schema.Struct({
|
||||
type: Schema.Literal("project.create"),
|
||||
commandId: CommandId,
|
||||
projectId: ProjectId,
|
||||
@@ -337,7 +337,7 @@ const ThreadInteractionModeSetCommand = Schema.Struct({
|
||||
createdAt: IsoDateTime,
|
||||
});
|
||||
|
||||
const ThreadTurnStartCommand = Schema.Struct({
|
||||
export const ThreadTurnStartCommand = Schema.Struct({
|
||||
type: Schema.Literal("thread.turn.start"),
|
||||
commandId: CommandId,
|
||||
threadId: ThreadId,
|
||||
@@ -980,7 +980,7 @@ export const TurnCountRange = Schema.Struct({
|
||||
),
|
||||
);
|
||||
|
||||
const ThreadTurnDiff = TurnCountRange.mapFields(
|
||||
export const ThreadTurnDiff = TurnCountRange.mapFields(
|
||||
Struct.assign({
|
||||
threadId: ThreadId,
|
||||
diff: Schema.String,
|
||||
|
||||
@@ -23,7 +23,7 @@ const TerminalIdWithDefaultSchema = TerminalIdSchema.pipe(
|
||||
Schema.withDecodingDefault(() => DEFAULT_TERMINAL_ID),
|
||||
);
|
||||
|
||||
const TerminalThreadInput = Schema.Struct({
|
||||
export const TerminalThreadInput = Schema.Struct({
|
||||
threadId: TrimmedNonEmptyStringSchema,
|
||||
});
|
||||
export type TerminalThreadInput = Schema.Codec.Encoded<typeof TerminalThreadInput>;
|
||||
|
||||
Reference in new issue
Block a user