@audiofool/moondog 0.3.0-beta.10 → 0.3.0-beta.11
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/README.md +29 -4
- package/package.json +1 -1
- package/scripts/moondog.mjs +10 -4
- package/src/core/apple-projection-domain-services.mjs +4 -0
- package/src/core/listening-profile-domain-services.mjs +4 -0
- package/src/core/moondog-application.mjs +10 -2
- package/src/i18n/screen/es.mjs +2 -0
- package/src/i18n/screen/ja.mjs +2 -0
- package/src/i18n/screen/pt.mjs +2 -0
- package/src/i18n/screen/zh.mjs +2 -0
- package/src/integrations/playlist-links.mjs +8 -2
- package/src/integrations/public-playlists.mjs +29 -4
- package/src/integrations/web/deepseek-web.mjs +1 -1
- package/src/integrations/web/web-research.mjs +84 -17
- package/src/integrations/web/web-result.mjs +60 -12
- package/src/profile/listening-history-store.mjs +54 -0
- package/src/runtime/pi/agent-runtime.mjs +35 -6
- package/src/runtime/pi/configured-runtime.mjs +3 -0
- package/src/runtime/pi/image-input.mjs +148 -0
- package/src/runtime/pi/model-roles.mjs +121 -0
- package/src/runtime/pi/model-settings.mjs +63 -2
- package/src/runtime/pi/runtime-settings.mjs +4 -2
- package/src/surfaces/cli/model-roles-command.mjs +60 -0
- package/src/surfaces/cli/tui.mjs +15 -1
package/src/surfaces/cli/tui.mjs
CHANGED
|
@@ -24,6 +24,8 @@ import { getPublicPiModelCatalog } from "../../runtime/pi/public-model-catalog.m
|
|
|
24
24
|
import { serviceKeyProviders, supportedAuthProviderIds } from "../../runtime/pi/authentication.mjs";
|
|
25
25
|
import { EFFORT_LEVELS, EFFORT_SCALE } from "../../runtime/pi/runtime-settings.mjs";
|
|
26
26
|
import { runtimeBehindSelection } from "../../runtime/pi/runtime-selection.mjs";
|
|
27
|
+
import { MODEL_ROLE_WORDS } from "./model-roles-command.mjs";
|
|
28
|
+
import { imagesFromText } from "../../runtime/pi/image-input.mjs";
|
|
27
29
|
import {
|
|
28
30
|
formatLocalResult,
|
|
29
31
|
helpText,
|
|
@@ -209,6 +211,7 @@ export async function runMoondogTui({
|
|
|
209
211
|
runProfile,
|
|
210
212
|
runProfileAction,
|
|
211
213
|
runWeb,
|
|
214
|
+
runModelRoles,
|
|
212
215
|
checkUpdates,
|
|
213
216
|
runUpdate,
|
|
214
217
|
lyrics,
|
|
@@ -1440,7 +1443,7 @@ export async function runMoondogTui({
|
|
|
1440
1443
|
// The window's endpoints reach /model here; an agent on an endpoint that changed is rebuilt, since its
|
|
1441
1444
|
// address or key may have. The window's menu list and its per-conversation choices don't move this one.
|
|
1442
1445
|
const stopWatchingModel = watchModelSettings?.((selection, changed) => {
|
|
1443
|
-
if (changed === "models") return;
|
|
1446
|
+
if (changed === "models" || changed === "roles") return;
|
|
1444
1447
|
if (changed === "endpoints") void refreshEndpoints?.();
|
|
1445
1448
|
const onEndpoint = changed === "endpoints" && String(runtimeStatus.provider ?? "").startsWith("endpoint-");
|
|
1446
1449
|
if (!onEndpoint && !runtimeBehindSelection(runtimeStatus, selection)) return;
|
|
@@ -2550,6 +2553,13 @@ export async function runMoondogTui({
|
|
|
2550
2553
|
return;
|
|
2551
2554
|
}
|
|
2552
2555
|
if (command === "model") {
|
|
2556
|
+
// /model roles, vision, web and audio set what other models are for; the rest pick the chat model.
|
|
2557
|
+
if (args[0] && Object.hasOwn(MODEL_ROLE_WORDS, args[0].toLowerCase())) {
|
|
2558
|
+
if (typeof runModelRoles !== "function") throw new Error(tr("Model roles aren't available when Moondog is started this way."));
|
|
2559
|
+
addMoondogMessage(await runModelRoles(args));
|
|
2560
|
+
setFooter(tr("Done."), success);
|
|
2561
|
+
return;
|
|
2562
|
+
}
|
|
2553
2563
|
await selectModel(args);
|
|
2554
2564
|
return;
|
|
2555
2565
|
}
|
|
@@ -2827,8 +2837,12 @@ export async function runMoondogTui({
|
|
|
2827
2837
|
};
|
|
2828
2838
|
|
|
2829
2839
|
try {
|
|
2840
|
+
// An image path in the message goes with it, as Hermes Agent's terminal does; the words stay.
|
|
2841
|
+
const images = await imagesFromText(value);
|
|
2842
|
+
if (images.length) setFooter(tr("Looking at the attached images... Ctrl+C cancels."));
|
|
2830
2843
|
const result = await activeRuntime.prompt(value, {
|
|
2831
2844
|
...(profileSeed ? { profileSeed } : {}),
|
|
2845
|
+
...(images.length ? { images } : {}),
|
|
2832
2846
|
onTextDelta: (delta) => {
|
|
2833
2847
|
if (cleanedUp) return;
|
|
2834
2848
|
work.quiet();
|