feat(chat): support markups, attachments, and timestamps in agent 1-to-1 chat (#368)

* feat(chat): support markups, attachments, and timestamps in agent 1-to-1 chat

* feat(chat): improve message card layout with inline badges and integrated assets

* fix(chat): enable image attachment thumbnails in 1-to-1 chat cards

* fix(chat): address code review feedback on input state, mentions, i18n, and session deletion

* fix(chat): replace ring with border color on selected message card
This commit is contained in:
Yiling-J
2026-08-31 20:11:27 +08:00
committed by GitHub
parent 6e9cf8dfb6
commit e06478df88
36 changed files with 1908 additions and 353 deletions
+8
View File
@@ -632,6 +632,7 @@ export * from "./count_overflow_assets.js";
export * from "./count_overflow_folders.js";
export * from "./select_source_folder.js";
export * from "./assets.js";
export * from "./attachments.js";
export * from "./filter.js";
export * from "./project_members.js";
export * from "./upload_file.js";
@@ -868,6 +869,9 @@ export * from "./disable_timestamp.js";
export * from "./enable_timestamp.js";
export * from "./attach_files.js";
export * from "./toggle_annotation.js";
export * from "./markup_not_supported_for_this_file.js";
export * from "./open_file_to_add_markup.js";
export * from "./type_a_message.js";
export * from "./loop.js";
export * from "./click_toggle_time_frames.js";
export * from "./quality.js";
@@ -1251,4 +1255,8 @@ export * from "./timecode.js";
export * from "./playback_speed.js";
export * from "./failed_to_post_comment.js";
export * from "./entry_id.js";
export * from "./back_to_chat.js";
export * from "./delete_session.js";
export * from "./thinking_status.js";
export * from "./page_prefix.js";
export type LocalizedString = import("../runtime.js").LocalizedString;
+9 -1
View File
@@ -634,6 +634,7 @@ export * from './count_overflow_assets.js'
export * from './count_overflow_folders.js'
export * from './select_source_folder.js'
export * from './assets.js'
export * from './attachments.js'
export * from './filter.js'
export * from './project_members.js'
export * from './upload_file.js'
@@ -870,6 +871,9 @@ export * from './disable_timestamp.js'
export * from './enable_timestamp.js'
export * from './attach_files.js'
export * from './toggle_annotation.js'
export * from './markup_not_supported_for_this_file.js'
export * from './open_file_to_add_markup.js'
export * from './type_a_message.js'
export * from './loop.js'
export * from './click_toggle_time_frames.js'
export * from './quality.js'
@@ -1252,4 +1256,8 @@ export * from './frames.js'
export * from './timecode.js'
export * from './playback_speed.js'
export * from './failed_to_post_comment.js'
export * from './entry_id.js'
export * from './entry_id.js'
export * from './back_to_chat.js'
export * from './delete_session.js'
export * from './thinking_status.js'
export * from './page_prefix.js'
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Attachments" |
*
* @param {AttachmentsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const attachments: ((inputs?: AttachmentsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<AttachmentsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type AttachmentsInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} AttachmentsInputs */
const en_attachments = /** @type {(inputs: AttachmentsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Attachments`)
};
const zh_attachments = /** @type {(inputs: AttachmentsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`附件`)
};
/**
* | output |
* | --- |
* | "Attachments" |
*
* @param {AttachmentsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const attachments = /** @type {((inputs?: AttachmentsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<AttachmentsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_attachments(inputs)
return zh_attachments(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Back to Chat" |
*
* @param {Back_To_ChatInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const back_to_chat: ((inputs?: Back_To_ChatInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Back_To_ChatInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Back_To_ChatInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Back_To_ChatInputs */
const en_back_to_chat = /** @type {(inputs: Back_To_ChatInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Back to Chat`)
};
const zh_back_to_chat = /** @type {(inputs: Back_To_ChatInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`返回聊天`)
};
/**
* | output |
* | --- |
* | "Back to Chat" |
*
* @param {Back_To_ChatInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const back_to_chat = /** @type {((inputs?: Back_To_ChatInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Back_To_ChatInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_back_to_chat(inputs)
return zh_back_to_chat(inputs)
});
@@ -10,7 +10,7 @@ const en_contains_drawing_annotations = /** @type {(inputs: Contains_Drawing_Ann
};
const zh_contains_drawing_annotations = /** @type {(inputs: Contains_Drawing_AnnotationsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`包含绘图标注`)
return /** @type {LocalizedString} */ (`包含标注绘图`)
};
/**
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Delete Session" |
*
* @param {Delete_SessionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_session: ((inputs?: Delete_SessionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Delete_SessionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Delete_SessionInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Delete_SessionInputs */
const en_delete_session = /** @type {(inputs: Delete_SessionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Delete Session`)
};
const zh_delete_session = /** @type {(inputs: Delete_SessionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`删除会话`)
};
/**
* | output |
* | --- |
* | "Delete Session" |
*
* @param {Delete_SessionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_session = /** @type {((inputs?: Delete_SessionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Delete_SessionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_delete_session(inputs)
return zh_delete_session(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Markup is not supported for this file type" |
*
* @param {Markup_Not_Supported_For_This_FileInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const markup_not_supported_for_this_file: ((inputs?: Markup_Not_Supported_For_This_FileInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Markup_Not_Supported_For_This_FileInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Markup_Not_Supported_For_This_FileInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Markup_Not_Supported_For_This_FileInputs */
const en_markup_not_supported_for_this_file = /** @type {(inputs: Markup_Not_Supported_For_This_FileInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Markup is not supported for this file type`)
};
const zh_markup_not_supported_for_this_file = /** @type {(inputs: Markup_Not_Supported_For_This_FileInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`此文件类型不支持标注`)
};
/**
* | output |
* | --- |
* | "Markup is not supported for this file type" |
*
* @param {Markup_Not_Supported_For_This_FileInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const markup_not_supported_for_this_file = /** @type {((inputs?: Markup_Not_Supported_For_This_FileInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Markup_Not_Supported_For_This_FileInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_markup_not_supported_for_this_file(inputs)
return zh_markup_not_supported_for_this_file(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Open a supported file to add markup" |
*
* @param {Open_File_To_Add_MarkupInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const open_file_to_add_markup: ((inputs?: Open_File_To_Add_MarkupInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Open_File_To_Add_MarkupInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Open_File_To_Add_MarkupInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Open_File_To_Add_MarkupInputs */
const en_open_file_to_add_markup = /** @type {(inputs: Open_File_To_Add_MarkupInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Open a supported file to add markup`)
};
const zh_open_file_to_add_markup = /** @type {(inputs: Open_File_To_Add_MarkupInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`打开支持的文件以添加标注`)
};
/**
* | output |
* | --- |
* | "Open a supported file to add markup" |
*
* @param {Open_File_To_Add_MarkupInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const open_file_to_add_markup = /** @type {((inputs?: Open_File_To_Add_MarkupInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Open_File_To_Add_MarkupInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_open_file_to_add_markup(inputs)
return zh_open_file_to_add_markup(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Page {page}" |
*
* @param {Page_PrefixInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const page_prefix: ((inputs: Page_PrefixInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Page_PrefixInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Page_PrefixInputs = {
page: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ page: NonNullable<unknown> }} Page_PrefixInputs */
const en_page_prefix = /** @type {(inputs: Page_PrefixInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Page ${i?.page}`)
};
const zh_page_prefix = /** @type {(inputs: Page_PrefixInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`第 ${i?.page} 页`)
};
/**
* | output |
* | --- |
* | "Page {page}" |
*
* @param {Page_PrefixInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const page_prefix = /** @type {((inputs: Page_PrefixInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Page_PrefixInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_page_prefix(inputs)
return zh_page_prefix(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Thinking..." |
*
* @param {Thinking_StatusInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const thinking_status: ((inputs?: Thinking_StatusInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Thinking_StatusInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Thinking_StatusInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Thinking_StatusInputs */
const en_thinking_status = /** @type {(inputs: Thinking_StatusInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Thinking...`)
};
const zh_thinking_status = /** @type {(inputs: Thinking_StatusInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`思考中...`)
};
/**
* | output |
* | --- |
* | "Thinking..." |
*
* @param {Thinking_StatusInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const thinking_status = /** @type {((inputs?: Thinking_StatusInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Thinking_StatusInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_thinking_status(inputs)
return zh_thinking_status(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Type a message..." |
*
* @param {Type_A_MessageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const type_a_message: ((inputs?: Type_A_MessageInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Type_A_MessageInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Type_A_MessageInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Type_A_MessageInputs */
const en_type_a_message = /** @type {(inputs: Type_A_MessageInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Type a message...`)
};
const zh_type_a_message = /** @type {(inputs: Type_A_MessageInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`输入消息...`)
};
/**
* | output |
* | --- |
* | "Type a message..." |
*
* @param {Type_A_MessageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const type_a_message = /** @type {((inputs?: Type_A_MessageInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Type_A_MessageInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_type_a_message(inputs)
return zh_type_a_message(inputs)
});