@getpaseo/server 0.2.0-beta.4 → 0.2.0
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/dist/server/server/agent/providers/omp/agent.js +4 -2
- package/dist/server/server/pairing-qr.d.ts +0 -5
- package/dist/server/server/pairing-qr.js +8 -38
- package/dist/server/web-ui/_expo/static/js/web/{index-5d28786e95ba24ba9283f45009fafd5e.js → index-16a70779e3dadd2086411dc8018efd32.js} +11 -11
- package/dist/server/web-ui/_expo/static/js/web/index-16a70779e3dadd2086411dc8018efd32.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-16a70779e3dadd2086411dc8018efd32.js.gz +0 -0
- package/dist/server/web-ui/index.html +1 -1
- package/dist/server/web-ui/index.html.br +0 -0
- package/dist/server/web-ui/index.html.gz +0 -0
- package/package.json +5 -5
- package/dist/server/web-ui/_expo/static/js/web/index-5d28786e95ba24ba9283f45009fafd5e.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-5d28786e95ba24ba9283f45009fafd5e.js.gz +0 -0
|
@@ -14,6 +14,7 @@ export { formatOmpVersionSupport, resolveOmpDiagnosticPaths } from "./provider-c
|
|
|
14
14
|
import { OmpSubagentCardTracker } from "./subagent-card-tracker.js";
|
|
15
15
|
import { shouldDisplayOmpCustomMessage } from "./custom-message.js";
|
|
16
16
|
import { getUserMessageText } from "./message-history.js";
|
|
17
|
+
import { mapOmpSystemNoticeToToolCall } from "./system-notice.js";
|
|
17
18
|
import { materializeProviderImage } from "../provider-image-output.js";
|
|
18
19
|
import { OmpCliRuntime } from "./cli-runtime.js";
|
|
19
20
|
import { listOmpImportableSessions, readOmpImportSessionConfig } from "./session-descriptor.js";
|
|
@@ -1637,12 +1638,13 @@ export class OmpAgentSession {
|
|
|
1637
1638
|
if (shouldDisplayOmpCustomMessage(event.message)) {
|
|
1638
1639
|
const text = getUserMessageText(event.message.content);
|
|
1639
1640
|
if (text) {
|
|
1640
|
-
const
|
|
1641
|
+
const item = mapOmpAdvisorMessageToToolCall(event.message, text) ??
|
|
1642
|
+
mapOmpSystemNoticeToToolCall(text);
|
|
1641
1643
|
this.emit({
|
|
1642
1644
|
type: "timeline",
|
|
1643
1645
|
provider: this.provider,
|
|
1644
1646
|
turnId,
|
|
1645
|
-
item:
|
|
1647
|
+
item: item ?? { type: "assistant_message", text },
|
|
1646
1648
|
});
|
|
1647
1649
|
}
|
|
1648
1650
|
}
|
|
@@ -1,45 +1,15 @@
|
|
|
1
1
|
import * as QRCode from "qrcode";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return undefined;
|
|
5
|
-
const normalized = value.trim().toLowerCase();
|
|
6
|
-
if (["1", "true", "yes", "y", "on"].includes(normalized))
|
|
7
|
-
return true;
|
|
8
|
-
if (["0", "false", "no", "n", "off"].includes(normalized))
|
|
9
|
-
return false;
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
function shouldPrintPairingQr() {
|
|
13
|
-
const env = parseBooleanEnv(process.env.PASEO_PAIRING_QR);
|
|
14
|
-
if (env !== undefined)
|
|
15
|
-
return env;
|
|
16
|
-
return process.stdout.isTTY ?? false;
|
|
17
|
-
}
|
|
2
|
+
const BLACK_ON_WHITE = "\u001b[47m\u001b[30m";
|
|
3
|
+
const RESET_COLORS = "\u001b[0m";
|
|
18
4
|
export async function renderPairingQr(url) {
|
|
19
|
-
const terminalOptions = {
|
|
20
|
-
type: "terminal",
|
|
21
|
-
small: true,
|
|
22
|
-
};
|
|
23
5
|
const utf8Options = {
|
|
24
6
|
type: "utf8",
|
|
7
|
+
margin: 4,
|
|
25
8
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export async function printPairingQrIfEnabled(args) {
|
|
34
|
-
if (!shouldPrintPairingQr())
|
|
35
|
-
return;
|
|
36
|
-
const qr = await renderPairingQr(args.url);
|
|
37
|
-
const out = `\nScan to pair:\n${qr}\n${args.url}\n`;
|
|
38
|
-
try {
|
|
39
|
-
process.stdout.write(out);
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
args.logger?.debug({ error }, "Failed to print pairing QR");
|
|
43
|
-
}
|
|
9
|
+
const qr = await QRCode.toString(url, utf8Options);
|
|
10
|
+
return qr
|
|
11
|
+
.split("\n")
|
|
12
|
+
.map((line) => `${BLACK_ON_WHITE}${line}${RESET_COLORS}`)
|
|
13
|
+
.join("\n");
|
|
44
14
|
}
|
|
45
15
|
//# sourceMappingURL=pairing-qr.js.map
|