alpha
Login
or
Join now
tokono.ma
/
diffuse-applets
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Experiment to rebuild Diffuse using web applets.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
refactor: queue + input problems
author
Steven Vandevelde
date
1 year ago
(Jun 21, 2025, 5:58 PM +0200)
commit
7f7133af
7f7133af8830aff696131d0036f5356ad983d5ca
parent
9ac4d4f5
9ac4d4f57b4e2a7826364a617f107f0a41d6166b
+15
-8
4 changed files
Expand all
Collapse all
Unified
Split
src
pages
configurator
input
_applet.astro
input
native-fs
_applet.astro
orchestrator
input-cache
_applet.astro
scripts
applet
common.ts
+7
-5
src/pages/configurator/input/_applet.astro
Reviewed
···
75
75
////////////////////////////////////////////
76
76
const contextualize = async (tracks: Track[]) => {
77
77
const groups = await groupTracksPerScheme(tracks);
78
78
-
const promises = Object.keys(groups).map(async (scheme: string) => {
79
79
-
if (!isSupportedScheme(scheme)) return;
80
80
-
const conn = await connection(scheme);
81
81
-
await conn.sendAction("contextualize", groups[scheme], { timeoutDuration: 60000 * 5 });
82
82
-
});
78
78
+
const promises = Object.entries(groups).map(
79
79
+
async ([scheme, tracksGroup]: [string, Track[]]) => {
80
80
+
if (!isSupportedScheme(scheme) || tracksGroup.length === 0) return;
81
81
+
const conn = await connection(scheme);
82
82
+
await conn.sendAction("contextualize", tracksGroup, { timeoutDuration: 60000 * 5 });
83
83
+
},
84
84
+
);
83
85
84
86
await Promise.all(promises);
85
87
};
+3
src/pages/input/native-fs/_applet.astro
Reviewed
···
107
107
return { supported: true, consultation: uri.host && !!handles[uri.host] };
108
108
};
109
109
110
110
+
const contextualize = async (cachedTracks: Track[]) => {};
111
111
+
110
112
const list = async (cachedTracks: Track[] = []) => {
111
113
if (!isSupported()) {
112
114
return cachedTracks;
···
222
224
};
223
225
224
226
context.setActionHandler("consult", consult);
227
227
+
context.setActionHandler("contextualize", contextualize);
225
228
context.setActionHandler("list", list);
226
229
context.setActionHandler("resolve", resolve);
227
230
context.setActionHandler("mount", mount);
+1
-1
src/pages/orchestrator/input-cache/_applet.astro
Reviewed
···
27
27
.settled()
28
28
.then(() => configurator.output)
29
29
.then((output) => wait(output, (d) => d?.tracks.state === "loaded"))
30
30
-
.then(() => process());
30
30
+
.then(() => (context.isMainInstance() ? process() : undefined));
31
31
32
32
////////////////////////////////////////////
33
33
// ACTIONS
+4
-2
src/scripts/applet/common.ts
Reviewed
···
311
311
dataFn: (data: D) => T,
312
312
effectFn: (t: T, setter: (t: T) => void) => void,
313
313
) => {
314
314
-
if (!context.isMainInstance()) return;
315
315
-
return reactive(applet, dataFn, effectFn);
314
314
+
// if (!context.isMainInstance()) return;
315
315
+
return reactive(applet, dataFn, (t, setter) => {
316
316
+
if (context.isMainInstance()) effectFn(t, setter);
317
317
+
});
316
318
};
317
319
}
318
320