fix: command length 150->1500, filter EPHEMERAL_MESSAGE, widen approval gate
This commit is contained in:
@@ -1627,7 +1627,7 @@ function setupMonitor() {
|
|||||||
try {
|
try {
|
||||||
const args = JSON.parse(toolCall.argumentsJson);
|
const args = JSON.parse(toolCall.argumentsJson);
|
||||||
if (args.CommandLine)
|
if (args.CommandLine)
|
||||||
command = `${toolName}: ${args.CommandLine.substring(0, 150)}`;
|
command = `${toolName}: ${args.CommandLine.substring(0, 1500)}`;
|
||||||
else if (args.TargetFile)
|
else if (args.TargetFile)
|
||||||
command = `${toolName}: ${args.TargetFile.split(/[\\/]/).pop()}`;
|
command = `${toolName}: ${args.TargetFile.split(/[\\/]/).pop()}`;
|
||||||
else
|
else
|
||||||
@@ -1846,7 +1846,7 @@ function setupMonitor() {
|
|||||||
for (let ri = steps.length - 1; ri >= 0; ri--) {
|
for (let ri = steps.length - 1; ri >= 0; ri--) {
|
||||||
const s = steps[ri];
|
const s = steps[ri];
|
||||||
const sType = s?.type || '';
|
const sType = s?.type || '';
|
||||||
if (sType.includes('PLANNER_RESPONSE') || sType.includes('MESSAGE')) {
|
if (sType.includes('PLANNER_RESPONSE') && !sType.includes('EPHEMERAL')) {
|
||||||
let textContent = '';
|
let textContent = '';
|
||||||
// Extract from plannerResponse field
|
// Extract from plannerResponse field
|
||||||
const pr = s?.plannerResponse;
|
const pr = s?.plannerResponse;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1604,7 +1604,7 @@ function setupMonitor() {
|
|||||||
if (toolCall?.argumentsJson) {
|
if (toolCall?.argumentsJson) {
|
||||||
try {
|
try {
|
||||||
const args = JSON.parse(toolCall.argumentsJson);
|
const args = JSON.parse(toolCall.argumentsJson);
|
||||||
if (args.CommandLine) command = `${toolName}: ${args.CommandLine.substring(0, 150)}`;
|
if (args.CommandLine) command = `${toolName}: ${args.CommandLine.substring(0, 1500)}`;
|
||||||
else if (args.TargetFile) command = `${toolName}: ${args.TargetFile.split(/[\\/]/).pop()}`;
|
else if (args.TargetFile) command = `${toolName}: ${args.TargetFile.split(/[\\/]/).pop()}`;
|
||||||
else command = `${toolName}: ${Object.keys(args).join(', ')}`;
|
else command = `${toolName}: ${Object.keys(args).join(', ')}`;
|
||||||
} catch { command = toolName; }
|
} catch { command = toolName; }
|
||||||
@@ -1812,7 +1812,7 @@ function setupMonitor() {
|
|||||||
for (let ri = steps.length - 1; ri >= 0; ri--) {
|
for (let ri = steps.length - 1; ri >= 0; ri--) {
|
||||||
const s = steps[ri];
|
const s = steps[ri];
|
||||||
const sType = s?.type || '';
|
const sType = s?.type || '';
|
||||||
if (sType.includes('PLANNER_RESPONSE') || sType.includes('MESSAGE')) {
|
if (sType.includes('PLANNER_RESPONSE') && !sType.includes('EPHEMERAL')) {
|
||||||
let textContent = '';
|
let textContent = '';
|
||||||
// Extract from plannerResponse field
|
// Extract from plannerResponse field
|
||||||
const pr = s?.plannerResponse;
|
const pr = s?.plannerResponse;
|
||||||
|
|||||||
Reference in New Issue
Block a user