@friendlyrobot/discord-pi-agent 0.7.4 → 0.7.6
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 +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100,9 +100,11 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
100
100
|
let eventCount = 0;
|
|
101
101
|
let toolCount = 0;
|
|
102
102
|
let sawAgentEnd = false;
|
|
103
|
+
const model = session.model ? `${session.model.provider}/${session.model.id}` : "none";
|
|
103
104
|
logger3.debug({
|
|
104
105
|
logPrefix,
|
|
105
106
|
promptLength: prompt.length,
|
|
107
|
+
model,
|
|
106
108
|
prompt
|
|
107
109
|
}, "prompt start");
|
|
108
110
|
const unsubscribe = session.subscribe((event) => {
|
|
@@ -133,6 +135,7 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
133
135
|
sawAgentEnd = true;
|
|
134
136
|
logger3.debug({
|
|
135
137
|
messageCount: event.messages.length,
|
|
138
|
+
model,
|
|
136
139
|
logPrefix
|
|
137
140
|
}, "agent end");
|
|
138
141
|
}
|
|
@@ -152,6 +155,7 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
152
155
|
streamedTextLength: streamedText.trim().length,
|
|
153
156
|
fallbackTextLength: fallbackText.trim().length,
|
|
154
157
|
errorMessage,
|
|
158
|
+
model,
|
|
155
159
|
logPrefix
|
|
156
160
|
}, "prompt done");
|
|
157
161
|
if (errorMessage) {
|
|
@@ -161,6 +165,7 @@ async function collectReply(session, prompt, options = {}) {
|
|
|
161
165
|
const transformed = await transformMarkdownTablesToCodeBlocks(finalText);
|
|
162
166
|
logger3.debug({
|
|
163
167
|
logPrefix,
|
|
168
|
+
model,
|
|
164
169
|
finalTextLength: finalText.length,
|
|
165
170
|
transformedTextLength: transformed.length,
|
|
166
171
|
transformed: transformed !== finalText
|
|
@@ -759,8 +764,8 @@ Example: !model openrouter/anthropic/claude-sonnet-4
|
|
|
759
764
|
Use !model without args to see available models.`
|
|
760
765
|
};
|
|
761
766
|
}
|
|
762
|
-
const provider = arg.substring(0, slashIndex);
|
|
763
|
-
const modelId = arg.substring(slashIndex + 1);
|
|
767
|
+
const provider = arg.substring(0, slashIndex).trim();
|
|
768
|
+
const modelId = arg.substring(slashIndex + 1).trim();
|
|
764
769
|
return {
|
|
765
770
|
handled: true,
|
|
766
771
|
response: await agentService.switchModel(provider, modelId, effectiveSession)
|