odant-work 1.0.112 → 1.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/$server/$folder/$class/$structure/handlers/pages/form/system/skills/$handler/class.js
CHANGED
|
@@ -313,9 +313,10 @@ export default {
|
|
|
313
313
|
if (this.$item && this._onChanged)
|
|
314
314
|
this.$item.unlisten?.('changed', this._onChanged);
|
|
315
315
|
},
|
|
316
|
-
async reload() {
|
|
316
|
+
async reload({ force = false } = {}) {
|
|
317
317
|
const item = this.$item;
|
|
318
318
|
if (!item || typeof item.fetch !== 'function') {
|
|
319
|
+
this._layersSig = '';
|
|
319
320
|
this.aiRoot = null;
|
|
320
321
|
return;
|
|
321
322
|
}
|
|
@@ -333,9 +334,14 @@ export default {
|
|
|
333
334
|
return;
|
|
334
335
|
const valid = resolved.filter(Boolean);
|
|
335
336
|
if (!valid.length) {
|
|
337
|
+
this._layersSig = '';
|
|
336
338
|
this.aiRoot = null;
|
|
337
339
|
return;
|
|
338
340
|
}
|
|
341
|
+
const sig = valid.map(v => `${v.item.path}|${v.scope}|${v.isOwn}`).join(';');
|
|
342
|
+
if (!force && this.aiRoot && this._layersSig === sig)
|
|
343
|
+
return;
|
|
344
|
+
this._layersSig = sig;
|
|
339
345
|
const ownAiPath = (item.meta_folder?.path || item.path || '') + '/ai';
|
|
340
346
|
this.aiRoot = buildMergedLayerFolder(valid, {
|
|
341
347
|
id: 'ai',
|
|
@@ -343,8 +349,10 @@ export default {
|
|
|
343
349
|
path: ownAiPath,
|
|
344
350
|
});
|
|
345
351
|
} catch {
|
|
346
|
-
if (seq === this._reloadSeq)
|
|
352
|
+
if (seq === this._reloadSeq) {
|
|
353
|
+
this._layersSig = '';
|
|
347
354
|
this.aiRoot = null;
|
|
355
|
+
}
|
|
348
356
|
}
|
|
349
357
|
},
|
|
350
358
|
async openImportDialog() {
|
|
@@ -352,7 +360,7 @@ export default {
|
|
|
352
360
|
return;
|
|
353
361
|
const dlg = ODA.createComponent(SKILL_IMPORT_MODAL_TAG, {
|
|
354
362
|
$item: this.$item,
|
|
355
|
-
onInstalled: () => this.reload(),
|
|
363
|
+
onInstalled: () => this.reload({ force: true }),
|
|
356
364
|
});
|
|
357
365
|
try {
|
|
358
366
|
await WORK.showModal(dlg, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
4
4
|
"description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sources/work.js",
|
|
@@ -60,7 +60,7 @@ export async function aiLayers(place) {
|
|
|
60
60
|
if (!dir || !key || seen.has(key))
|
|
61
61
|
continue;
|
|
62
62
|
seen.add(key);
|
|
63
|
-
dir.reset?.();
|
|
63
|
+
dir.reset?.(undefined, { localOnly: true });
|
|
64
64
|
out.push({ dir, scope: scopeOfAiDir(dir), owner: dir.$owner || null });
|
|
65
65
|
}
|
|
66
66
|
return out;
|
|
@@ -161,7 +161,7 @@ export async function loadDocs(place, sub) {
|
|
|
161
161
|
const folder = await safe(() => dir.get_item(sub));
|
|
162
162
|
if (!folder || Array.isArray(folder) || folder.inherit_source)
|
|
163
163
|
continue;
|
|
164
|
-
folder.reset?.();
|
|
164
|
+
folder.reset?.(undefined, { localOnly: true });
|
|
165
165
|
const kids = folder._collect_own()
|
|
166
166
|
.filter(f => f instanceof FS.$file)
|
|
167
167
|
.sort((a, b) => String(a.id || '').localeCompare(String(b.id || '')));
|
package/sources/server/folder.js
CHANGED
|
@@ -2350,6 +2350,8 @@ export class $folder extends $item{
|
|
|
2350
2350
|
}
|
|
2351
2351
|
reset(initiator, opts){
|
|
2352
2352
|
this[R].cache = {};
|
|
2353
|
+
if (opts?.localOnly)
|
|
2354
|
+
return true;
|
|
2353
2355
|
let key = this.short;
|
|
2354
2356
|
for(let session of Object.values($server.sessions)){
|
|
2355
2357
|
for(let id in session.sockets){
|