Improve cursor logging
This commit is contained in:
@@ -83859,7 +83859,7 @@ function query({
|
||||
// package.json
|
||||
var package_default = {
|
||||
name: "@pullfrog/action",
|
||||
version: "0.0.119",
|
||||
version: "0.0.120",
|
||||
type: "module",
|
||||
files: [
|
||||
"index.js",
|
||||
@@ -93400,7 +93400,7 @@ var cursor = agent({
|
||||
},
|
||||
run: async ({ payload, apiKey, cliPath, mcpServers }) => {
|
||||
configureCursorMcpServers({ mcpServers, cliPath });
|
||||
const loggedAssistantMessages = /* @__PURE__ */ new Set();
|
||||
const loggedModelCallIds = /* @__PURE__ */ new Set();
|
||||
const messageHandlers4 = {
|
||||
system: (_event) => {
|
||||
},
|
||||
@@ -93410,8 +93410,13 @@ var cursor = agent({
|
||||
},
|
||||
assistant: (event) => {
|
||||
const text = event.message?.content?.[0]?.text?.trim();
|
||||
if (text && !loggedAssistantMessages.has(text)) {
|
||||
loggedAssistantMessages.add(text);
|
||||
if (!text) return;
|
||||
if (event.model_call_id) {
|
||||
if (!loggedModelCallIds.has(event.model_call_id)) {
|
||||
loggedModelCallIds.add(event.model_call_id);
|
||||
log.box(text, { title: "Cursor" });
|
||||
}
|
||||
} else {
|
||||
log.box(text, { title: "Cursor" });
|
||||
}
|
||||
},
|
||||
@@ -93456,7 +93461,7 @@ var cursor = agent({
|
||||
fullPrompt,
|
||||
"--output-format",
|
||||
"stream-json",
|
||||
"--stream-partial-output",
|
||||
// "--stream-partial-output",
|
||||
"--approve-mcps",
|
||||
"--force"
|
||||
],
|
||||
@@ -93486,7 +93491,6 @@ var cursor = agent({
|
||||
if (handler2) {
|
||||
await handler2(event);
|
||||
}
|
||||
log.debug(`[cursor event] ${JSON.stringify(event, null, 2)}`);
|
||||
} catch {
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user