mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-06 16:24:17 +00:00
feat(chat): append and display context_display_info custom entry for attached assets
This commit is contained in:
+1
@@ -4,6 +4,7 @@ export * from "./uploads.js";
|
||||
export * from "./language.js";
|
||||
export * from "./personal_info.js";
|
||||
export * from "./language_settings.js";
|
||||
export * from "./assets_added_to_context.js";
|
||||
export * from "./select_preferred_language.js";
|
||||
export * from "./settings.js";
|
||||
export * from "./welcome_back.js";
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ export * from './uploads.js'
|
||||
export * from './language.js'
|
||||
export * from './personal_info.js'
|
||||
export * from './language_settings.js'
|
||||
export * from './assets_added_to_context.js'
|
||||
export * from './select_preferred_language.js'
|
||||
export * from './settings.js'
|
||||
export * from './welcome_back.js'
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Assets added to context:" |
|
||||
*
|
||||
* @param {Assets_Added_To_ContextInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const assets_added_to_context: ((inputs?: Assets_Added_To_ContextInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Assets_Added_To_ContextInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Assets_Added_To_ContextInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Assets_Added_To_ContextInputs */
|
||||
|
||||
const en_assets_added_to_context = /** @type {(inputs: Assets_Added_To_ContextInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Assets added to context:`)
|
||||
};
|
||||
|
||||
const zh_assets_added_to_context = /** @type {(inputs: Assets_Added_To_ContextInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`已添加至上下文的资源:`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Assets added to context:" |
|
||||
*
|
||||
* @param {Assets_Added_To_ContextInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const assets_added_to_context = /** @type {((inputs?: Assets_Added_To_ContextInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Assets_Added_To_ContextInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_assets_added_to_context(inputs)
|
||||
return zh_assets_added_to_context(inputs)
|
||||
});
|
||||
Reference in New Issue
Block a user