feat: add nickname
This commit is contained in:
@@ -124,6 +124,7 @@ export const languageEnglish = {
|
|||||||
combineTranslation: "If enabled, text that is one sentence but separated by HTML tags will be combined together and translated, then Modify Display script will be reapplied to the translated output.\nThis helps the translator to make the correct translation.\nIf the UI becomes weird when you enable this option, please turn off the option and report it.",
|
combineTranslation: "If enabled, text that is one sentence but separated by HTML tags will be combined together and translated, then Modify Display script will be reapplied to the translated output.\nThis helps the translator to make the correct translation.\nIf the UI becomes weird when you enable this option, please turn off the option and report it.",
|
||||||
dynamicAssets: "If enabled, if the asset name is not found when processing data, it will try to find the closest asset name by using vector search and replace it with the closest asset name.",
|
dynamicAssets: "If enabled, if the asset name is not found when processing data, it will try to find the closest asset name by using vector search and replace it with the closest asset name.",
|
||||||
dynamicAssetsEditDisplay: "If enabled, the dynamic assets will be applied to the Modify Display stage too. however, this can cause performance issues.",
|
dynamicAssetsEditDisplay: "If enabled, the dynamic assets will be applied to the Modify Display stage too. however, this can cause performance issues.",
|
||||||
|
nickname: "Nickname would used be in {{char}} or <char> in chat instead of character's name if it is set.",
|
||||||
},
|
},
|
||||||
setup: {
|
setup: {
|
||||||
chooseProvider: "Choose AI Provider",
|
chooseProvider: "Choose AI Provider",
|
||||||
@@ -604,4 +605,5 @@ export const languageEnglish = {
|
|||||||
shareExport: "Share/Export",
|
shareExport: "Share/Export",
|
||||||
risupresetDesc: "Risupreset format is a format specifically designed for RisuAI presets.",
|
risupresetDesc: "Risupreset format is a format specifically designed for RisuAI presets.",
|
||||||
jsonDesc: "JSON format is a format that is easy to read and write for both humans and machines.",
|
jsonDesc: "JSON format is a format that is easy to read and write for both humans and machines.",
|
||||||
|
nickname: "Nickname",
|
||||||
}
|
}
|
||||||
@@ -761,6 +761,9 @@
|
|||||||
<span class="text-textcolor">{language.CharVersion}</span>
|
<span class="text-textcolor">{language.CharVersion}</span>
|
||||||
<TextInput size="sm" bind:value={currentChar.data.additionalData.character_version}/>
|
<TextInput size="sm" bind:value={currentChar.data.additionalData.character_version}/>
|
||||||
|
|
||||||
|
<span class="text-textcolor">{language.nickname} <Help key="nickname" /></span>
|
||||||
|
<TextInput size="sm" bind:value={currentChar.data.nickname}/>
|
||||||
|
|
||||||
<span class="text-textcolor">{language.depthPrompt}</span>
|
<span class="text-textcolor">{language.depthPrompt}</span>
|
||||||
<div class="flex justify-center items-center">
|
<div class="flex justify-center items-center">
|
||||||
<NumberInput size="sm" bind:value={currentChar.data.depth_prompt.depth} className="w-12"/>
|
<NumberInput size="sm" bind:value={currentChar.data.depth_prompt.depth} className="w-12"/>
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
let selectedChar = get(selectedCharID)
|
let selectedChar = get(selectedCharID)
|
||||||
let currentChar = db.characters[selectedChar]
|
let currentChar = db.characters[selectedChar]
|
||||||
if(currentChar && currentChar.type !== 'group'){
|
if(currentChar && currentChar.type !== 'group'){
|
||||||
return currentChar.name
|
return currentChar.nickname || currentChar.name
|
||||||
}
|
}
|
||||||
if(chara){
|
if(chara){
|
||||||
if(typeof(chara) === 'string'){
|
if(typeof(chara) === 'string'){
|
||||||
@@ -455,7 +455,7 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
return chara.name
|
return chara.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return currentChar.name
|
return currentChar.nickname || currentChar.name
|
||||||
}
|
}
|
||||||
case 'user':{
|
case 'user':{
|
||||||
if(matcherArg.consistantChar){
|
if(matcherArg.consistantChar){
|
||||||
@@ -1087,7 +1087,7 @@ const smMatcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
let selectedChar = get(selectedCharID)
|
let selectedChar = get(selectedCharID)
|
||||||
let currentChar = db.characters[selectedChar]
|
let currentChar = db.characters[selectedChar]
|
||||||
if(currentChar && currentChar.type !== 'group'){
|
if(currentChar && currentChar.type !== 'group'){
|
||||||
return currentChar.name
|
return currentChar.nickname || currentChar.name
|
||||||
}
|
}
|
||||||
if(chara){
|
if(chara){
|
||||||
if(typeof(chara) === 'string'){
|
if(typeof(chara) === 'string'){
|
||||||
@@ -1097,7 +1097,7 @@ const smMatcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
return chara.name
|
return chara.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return currentChar.name
|
return currentChar.nickname || currentChar.name
|
||||||
}
|
}
|
||||||
case 'user':{
|
case 'user':{
|
||||||
if(matcherArg.consistantChar){
|
if(matcherArg.consistantChar){
|
||||||
|
|||||||
@@ -829,6 +829,7 @@ export interface groupChat{
|
|||||||
virtualscript?:string
|
virtualscript?:string
|
||||||
lorePlus?:boolean
|
lorePlus?:boolean
|
||||||
trashTime?:number
|
trashTime?:number
|
||||||
|
nickname?:string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface botPreset{
|
export interface botPreset{
|
||||||
|
|||||||
Reference in New Issue
Block a user