mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 05:02:40 +00:00
fix(environment): own JSON fields across capture, state and replay
This commit is contained in:
1 parent
cc5a96933a
commit
e54bf1006e
57 files changed
+1019
-389
No files matched your search
@@ -28,8 +28,10 @@ export const pinnedRequest = (
|
||||
);
|
||||
if (!query.ok) return err(refused(tool, `Tool ${tool.name} ${query.error}`));
|
||||
const names = environmentToolArguments(tool).query;
|
||||
const filled = { ...args };
|
||||
for (const [name, value] of query.value)
|
||||
filled[names.get(name) ?? name] ??= value;
|
||||
return ok({ ...request, args: filled });
|
||||
const filled = new Map(Object.entries(args));
|
||||
for (const [name, value] of query.value) {
|
||||
const argument = names.get(name) ?? name;
|
||||
if (filled.get(argument) == null) filled.set(argument, value);
|
||||
}
|
||||
return ok({ ...request, args: Object.fromEntries(filled) });
|
||||
};
|
||||
Reference in new issue
Block a user