Extract memind_adm admin server, add local dev tooling, and remove image-generation.
Split platform admin and ops APIs into standalone admin-server.mjs with network guards; simplify billing to RMB token pricing, refactor user auth, and add rsync deploy plus local-test scripts and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
/** Format CNY cents-per-1k-tokens as readable yuan string. */
|
||||
export function formatYuanPer1kTokens(centsPer1k: number) {
|
||||
const yuan = centsPer1k / 100;
|
||||
if (yuan >= 0.01) return `¥${yuan.toFixed(2)}/1k`;
|
||||
return `¥${yuan.toFixed(3)}/1k`;
|
||||
}
|
||||
|
||||
/** Approximate yuan per million tokens from cents-per-1k rate. */
|
||||
export function formatYuanPerMillionTokens(centsPer1k: number) {
|
||||
const yuanPerM = (centsPer1k / 100) * 1000;
|
||||
if (yuanPerM >= 1) return `约 ¥${yuanPerM.toFixed(1).replace(/\.0$/, '')}/百万`;
|
||||
return `约 ¥${yuanPerM.toFixed(2)}/百万`;
|
||||
}
|
||||
|
||||
export function formatBillingRates(inputCentsPer1k: number, outputCentsPer1k: number) {
|
||||
return `输入 ${formatYuanPer1kTokens(inputCentsPer1k)}(${formatYuanPerMillionTokens(inputCentsPer1k)}),输出 ${formatYuanPer1kTokens(outputCentsPer1k)}(${formatYuanPerMillionTokens(outputCentsPer1k)})`;
|
||||
}
|
||||
@@ -13,8 +13,7 @@ export type ChatSkillIconId =
|
||||
| 'form'
|
||||
| 'table'
|
||||
| 'summary'
|
||||
| 'analyze'
|
||||
| 'image';
|
||||
| 'analyze';
|
||||
|
||||
export type ChatSkillOption = {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user