1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 18:44:02 +02:00

refactor(frontend): ID生成処理を統一

This commit is contained in:
syuilo
2025-06-03 07:37:08 +09:00
parent 3bc81522c6
commit 93d17aff6c
16 changed files with 35 additions and 20 deletions

View File

@@ -29,6 +29,7 @@ import MkContainer from '@/components/MkContainer.vue';
import { aiScriptReadline, createAiScriptEnv } from '@/aiscript/api.js';
import { $i } from '@/i.js';
import { i18n } from '@/i18n.js';
import { genId } from '@/utility/id.js';
const name = 'aiscript';
@@ -73,7 +74,7 @@ const run = async () => {
in: aiScriptReadline,
out: (value) => {
logs.value.push({
id: Math.random().toString(),
id: genId(),
text: value.type === 'str' ? value.value : utils.valToString(value),
print: true,
});
@@ -81,7 +82,7 @@ const run = async () => {
log: (type, params) => {
switch (type) {
case 'end': logs.value.push({
id: Math.random().toString(),
id: genId(),
text: utils.valToString(params.val, true),
print: false,
}); break;