mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-10 05:25:51 +00:00
Update cwb_uiManager.js
This commit is contained in:
@@ -14,31 +14,30 @@ function createCharCardViewerPopupHtml(displayItems) {
|
|||||||
const pathToLabelMap = {
|
const pathToLabelMap = {
|
||||||
'narrative_essence.core_traits.name': '特质名称',
|
'narrative_essence.core_traits.name': '特质名称',
|
||||||
'narrative_essence.key_relationships.name': '关系人姓名',
|
'narrative_essence.key_relationships.name': '关系人姓名',
|
||||||
|
'NE.trait.name': '特质名称',
|
||||||
|
'NE.rel.name': '关系人姓名',
|
||||||
};
|
};
|
||||||
const keyToLabelMap = {
|
const keyToLabelMap = {
|
||||||
'name': '姓名',
|
'name': '姓名',
|
||||||
|
// Old keys
|
||||||
'archetype': '身份原型',
|
'archetype': '身份原型',
|
||||||
'gender': '性别',
|
'gender': '性别',
|
||||||
'age': '年龄',
|
'age': '年龄',
|
||||||
'race': '种族',
|
'race': '种族',
|
||||||
'current_status': '当前状态',
|
'current_status': '当前状态',
|
||||||
|
|
||||||
'first_impression': '第一印象',
|
'first_impression': '第一印象',
|
||||||
'key_features': '显著特征',
|
'key_features': '显著特征',
|
||||||
'attire': '衣着风格',
|
'attire': '衣着风格',
|
||||||
'mannerisms': '习惯举止',
|
'mannerisms': '习惯举止',
|
||||||
'voice': '声音特征',
|
'voice': '声音特征',
|
||||||
|
|
||||||
'tags': '性格标签',
|
'tags': '性格标签',
|
||||||
'description': '性格详述',
|
'description': '性格详述',
|
||||||
'motivation': '内在驱动',
|
'motivation': '内在驱动',
|
||||||
'values': '价值观',
|
'values': '价值观',
|
||||||
'inner_conflict': '内心挣扎',
|
'inner_conflict': '内心挣扎',
|
||||||
|
|
||||||
'interaction_style': '互动风格',
|
'interaction_style': '互动风格',
|
||||||
'skills': '技能能力',
|
'skills': '技能能力',
|
||||||
'reputation': '他人声望',
|
'reputation': '他人声望',
|
||||||
|
|
||||||
'core_traits': '核心特质',
|
'core_traits': '核心特质',
|
||||||
'verbal_patterns': '语言范式',
|
'verbal_patterns': '语言范式',
|
||||||
'key_relationships': '关键关系',
|
'key_relationships': '关键关系',
|
||||||
@@ -47,6 +46,44 @@ function createCharCardViewerPopupHtml(displayItems) {
|
|||||||
'style_summary': '风格总结',
|
'style_summary': '风格总结',
|
||||||
'quotes': '代表性引言',
|
'quotes': '代表性引言',
|
||||||
'summary': '关系概述',
|
'summary': '关系概述',
|
||||||
|
|
||||||
|
// New short keys
|
||||||
|
'CI': '核心认同',
|
||||||
|
'PI': '物理印记',
|
||||||
|
'PP': '心智侧写',
|
||||||
|
'SM': '社交矩阵',
|
||||||
|
'NE': '叙事精粹',
|
||||||
|
|
||||||
|
'arch': '身份原型',
|
||||||
|
'gen': '性别',
|
||||||
|
// age is same
|
||||||
|
// race is same
|
||||||
|
'status': '当前状态',
|
||||||
|
|
||||||
|
'first': '第一印象',
|
||||||
|
'feat': '显著特征',
|
||||||
|
// attire is same
|
||||||
|
'manner': '习惯举止',
|
||||||
|
// voice is same
|
||||||
|
|
||||||
|
// tags is same
|
||||||
|
'desc': '性格详述',
|
||||||
|
'mot': '内在驱动',
|
||||||
|
'val': '价值观',
|
||||||
|
'conf': '内心挣扎',
|
||||||
|
|
||||||
|
'style': '互动风格/风格总结', // Shared by SM.style and NE.verb.style
|
||||||
|
'skill': '技能能力',
|
||||||
|
'rep': '他人声望',
|
||||||
|
|
||||||
|
'trait': '核心特质',
|
||||||
|
'verb': '语言范式',
|
||||||
|
'rel': '关键关系',
|
||||||
|
|
||||||
|
'def': '特质定义',
|
||||||
|
'evid': '具体事例',
|
||||||
|
'quote': '代表性引言',
|
||||||
|
'sum': '关系概述',
|
||||||
};
|
};
|
||||||
const getLabel = (key, path) => {
|
const getLabel = (key, path) => {
|
||||||
const pathKey = path.replace(/\.\d+\./g, '.');
|
const pathKey = path.replace(/\.\d+\./g, '.');
|
||||||
@@ -141,11 +178,22 @@ function createCharCardViewerPopupHtml(displayItems) {
|
|||||||
if (charData) {
|
if (charData) {
|
||||||
const charName = charData.name || `角色 ${index + 1}`;
|
const charName = charData.name || `角色 ${index + 1}`;
|
||||||
if (charData.name) html += renderCard('姓名', { name: charData.name }, '');
|
if (charData.name) html += renderCard('姓名', { name: charData.name }, '');
|
||||||
|
|
||||||
|
// Support both old and new formats
|
||||||
if (charData.core_identity) html += renderCard('核心认同', charData.core_identity, 'core_identity');
|
if (charData.core_identity) html += renderCard('核心认同', charData.core_identity, 'core_identity');
|
||||||
|
if (charData.CI) html += renderCard('核心认同', charData.CI, 'CI');
|
||||||
|
|
||||||
if (charData.physical_imprint) html += renderCard('物理印记', charData.physical_imprint, 'physical_imprint');
|
if (charData.physical_imprint) html += renderCard('物理印记', charData.physical_imprint, 'physical_imprint');
|
||||||
|
if (charData.PI) html += renderCard('物理印记', charData.PI, 'PI');
|
||||||
|
|
||||||
if (charData.psyche_profile) html += renderCard('心智侧写', charData.psyche_profile, 'psyche_profile');
|
if (charData.psyche_profile) html += renderCard('心智侧写', charData.psyche_profile, 'psyche_profile');
|
||||||
|
if (charData.PP) html += renderCard('心智侧写', charData.PP, 'PP');
|
||||||
|
|
||||||
if (charData.social_matrix) html += renderCard('社交矩阵', charData.social_matrix, 'social_matrix');
|
if (charData.social_matrix) html += renderCard('社交矩阵', charData.social_matrix, 'social_matrix');
|
||||||
|
if (charData.SM) html += renderCard('社交矩阵', charData.SM, 'SM');
|
||||||
|
|
||||||
if (charData.narrative_essence) html += renderCard('叙事精粹', charData.narrative_essence, 'narrative_essence');
|
if (charData.narrative_essence) html += renderCard('叙事精粹', charData.narrative_essence, 'narrative_essence');
|
||||||
|
if (charData.NE) html += renderCard('叙事精粹', charData.NE, 'NE');
|
||||||
|
|
||||||
html += `<div class="cwb-cyber-card cwb-insertion-settings-card">
|
html += `<div class="cwb-cyber-card cwb-insertion-settings-card">
|
||||||
<h4 class="cwb-cyber-card__title">注入设置</h4>
|
<h4 class="cwb-cyber-card__title">注入设置</h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user