@friendlyrobot/discord-pi-agent 0.1.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/index.js +3 -3
- package/dist/prompt-context.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -564,7 +564,6 @@ class PromptQueue {
|
|
|
564
564
|
function buildTimeContextPrompt(userMessage, options = {}) {
|
|
565
565
|
const timeZone = options.timeZone || "UTC";
|
|
566
566
|
const locale = options.locale || "en-AU";
|
|
567
|
-
const locationLabel = options.locationLabel || timeZone;
|
|
568
567
|
const now = options.now || new Date;
|
|
569
568
|
const localTime = new Intl.DateTimeFormat(locale, {
|
|
570
569
|
timeZone,
|
|
@@ -573,10 +572,11 @@ function buildTimeContextPrompt(userMessage, options = {}) {
|
|
|
573
572
|
year: "2-digit",
|
|
574
573
|
hour: "2-digit",
|
|
575
574
|
minute: "2-digit",
|
|
576
|
-
hour12: false
|
|
575
|
+
hour12: false,
|
|
576
|
+
timeZoneName: "short"
|
|
577
577
|
}).format(now);
|
|
578
578
|
const trimmedMessage = userMessage.trim();
|
|
579
|
-
return [
|
|
579
|
+
return [`<time>${localTime}</time>`, "", trimmedMessage].join(`
|
|
580
580
|
`);
|
|
581
581
|
}
|
|
582
582
|
|
package/dist/prompt-context.d.ts
CHANGED