Merge remote main with teacher streaming and composer updates
This commit is contained in:
commit
1c07f7b5cb
98 files changed
+3934
-359
No files matched your search
@@ -142,6 +142,8 @@ export type ConversationContentBlock =
|
||||
export interface ConversationMessageNode {
|
||||
kind: 'message';
|
||||
id: string;
|
||||
/** Epoch ms: user send time / assistant completion time. Absent for undated history. */
|
||||
timestamp?: number;
|
||||
sourceEntryId?: string;
|
||||
clientRequestId?: string;
|
||||
role: 'user' | 'assistant';
|
||||
|
||||
@@ -78,6 +78,8 @@ export interface TeacherRequest {
|
||||
projectId?: string;
|
||||
projectName?: string;
|
||||
teacherVersion?: number;
|
||||
/** Explicit per-question model; absent follows the published teacher configuration. */
|
||||
modelId?: string;
|
||||
runtimeThreadId?: string;
|
||||
origin?: { projectId: string; topicId: string; requestId: string };
|
||||
/** discussion-v1 is retained only to identify historical replies. */
|
||||
@@ -105,6 +107,8 @@ export interface TeacherRequest {
|
||||
text: string;
|
||||
references: TeacherReference[];
|
||||
createdAt: string;
|
||||
/** Actual terminal time, absent in older history; never inferred from topic.updatedAt. */
|
||||
finishedAt?: string;
|
||||
sourceCursor: TeacherSourceContext['cursor'];
|
||||
sourceCapturedAt: string;
|
||||
includedSourceMessageIds: string[];
|
||||
@@ -154,7 +158,13 @@ export interface TeacherTopicList {
|
||||
items: Array<{ id: string; title: string; updatedAt: string; version: number; teacherId?: string; legacyRole?: 'friend'; legacySourceId?: string }>;
|
||||
lastSelectedTopicId: string | null;
|
||||
}
|
||||
export interface TeacherModelCatalog {
|
||||
supported: boolean;
|
||||
models: Array<{ id: string }>;
|
||||
message?: string;
|
||||
}
|
||||
export interface TeacherSend {
|
||||
modelId?: string;
|
||||
projectId?: string;
|
||||
intent?: TeacherRequestIntent;
|
||||
sourceConversationId?: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ export const OPEN_WORK_PROMPT = `【系统操作:打开作品】
|
||||
这是点击作品触发的内部操作。完成后简短告知结果,不复述本指令。`;
|
||||
|
||||
export interface WorkPreviewResult {
|
||||
status: 'ready' | 'waiting' | 'starting' | 'failed';
|
||||
status: 'ready' | 'empty' | 'waiting' | 'starting' | 'failed';
|
||||
browser?: AgentBrowserSnapshot;
|
||||
conversation?: CodingConversationMetadata;
|
||||
message?: string;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/** Read only real, valid epoch milliseconds / ISO dates; never invent a history time. */
|
||||
export function messageTimestamp(value: unknown): number | undefined {
|
||||
const timestamp = typeof value === 'number' ? value
|
||||
: typeof value === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(value) ? Date.parse(value) : NaN;
|
||||
return Number.isFinite(timestamp) && timestamp >= 0 && !Number.isNaN(new Date(timestamp).getTime())
|
||||
? timestamp : undefined;
|
||||
}
|
||||
Reference in new issue
Block a user