mirror of https://github.com/buster-so/buster.git
for the most part things are looking good
This commit is contained in:
parent
35e0fc27d7
commit
b3cfa35430
|
@ -190,7 +190,6 @@ No conversation history available for analysis.`,
|
||||||
maxOutputTokens: 10000,
|
maxOutputTokens: 10000,
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
anthropic: {
|
anthropic: {
|
||||||
disableParallelToolCalls: true,
|
|
||||||
thinking: { type: 'enabled', budgetTokens: 16000 },
|
thinking: { type: 'enabled', budgetTokens: 16000 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,10 @@ import {
|
||||||
// Factory function that creates a type-safe callback for the specific agent context
|
// Factory function that creates a type-safe callback for the specific agent context
|
||||||
export function createDoneToolStart(context: DoneToolContext, doneToolState: DoneToolState) {
|
export function createDoneToolStart(context: DoneToolContext, doneToolState: DoneToolState) {
|
||||||
return async function doneToolStart(options: ToolCallOptions): Promise<void> {
|
return async function doneToolStart(options: ToolCallOptions): Promise<void> {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
doneToolState.toolCallId = options.toolCallId;
|
doneToolState.toolCallId = options.toolCallId;
|
||||||
|
doneToolState.args = undefined;
|
||||||
|
doneToolState.finalResponse = undefined;
|
||||||
|
|
||||||
// Extract files from the tool call responses in messages
|
// Extract files from the tool call responses in messages
|
||||||
if (options.messages) {
|
if (options.messages) {
|
||||||
|
|
|
@ -17,8 +17,10 @@ export function createMessageUserClarifyingQuestionStart(
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
const messageId = context.messageId;
|
const messageId = context.messageId;
|
||||||
|
|
||||||
// Initialize state
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
state.args = '';
|
||||||
|
state.clarifyingQuestion = undefined;
|
||||||
|
|
||||||
// If we have a messageId, create initial database entries
|
// If we have a messageId, create initial database entries
|
||||||
if (messageId) {
|
if (messageId) {
|
||||||
|
|
|
@ -17,7 +17,10 @@ export function createRespondWithoutAssetCreationStart(
|
||||||
return async function respondWithoutAssetCreationStart(
|
return async function respondWithoutAssetCreationStart(
|
||||||
options: Pick<ToolCallOptions, 'toolCallId'>
|
options: Pick<ToolCallOptions, 'toolCallId'>
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
state.args = undefined;
|
||||||
|
state.final_response = undefined;
|
||||||
|
|
||||||
const responseEntry = createRespondWithoutAssetCreationResponseMessage(
|
const responseEntry = createRespondWithoutAssetCreationResponseMessage(
|
||||||
state,
|
state,
|
||||||
|
|
|
@ -8,12 +8,14 @@ import {
|
||||||
|
|
||||||
export function createExecuteSqlStart(state: ExecuteSqlState, context: ExecuteSqlContext) {
|
export function createExecuteSqlStart(state: ExecuteSqlState, context: ExecuteSqlContext) {
|
||||||
return async function executeSqlStart(options: ToolCallOptions): Promise<void> {
|
return async function executeSqlStart(options: ToolCallOptions): Promise<void> {
|
||||||
// Initialize state
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
state.args = '';
|
state.args = '';
|
||||||
state.statements = [];
|
state.statements = [];
|
||||||
state.isComplete = false;
|
state.isComplete = false;
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
state.executionTime = undefined;
|
||||||
|
state.executionResults = undefined;
|
||||||
|
|
||||||
// Create initial reasoning entry for SQL execution
|
// Create initial reasoning entry for SQL execution
|
||||||
const reasoningEntry = createExecuteSqlReasoningEntry(state, options.toolCallId);
|
const reasoningEntry = createExecuteSqlReasoningEntry(state, options.toolCallId);
|
||||||
|
|
|
@ -15,9 +15,13 @@ export function createSequentialThinkingStart(
|
||||||
context: SequentialThinkingContext
|
context: SequentialThinkingContext
|
||||||
) {
|
) {
|
||||||
return async function sequentialThinkingStart(options: ToolCallOptions): Promise<void> {
|
return async function sequentialThinkingStart(options: ToolCallOptions): Promise<void> {
|
||||||
// Set the entry ID and start time in state
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
sequentialThinkingState.toolCallId = options.toolCallId;
|
sequentialThinkingState.toolCallId = options.toolCallId;
|
||||||
sequentialThinkingState.startTime = Date.now();
|
sequentialThinkingState.startTime = Date.now();
|
||||||
|
sequentialThinkingState.args = undefined;
|
||||||
|
sequentialThinkingState.thought = undefined;
|
||||||
|
sequentialThinkingState.nextThoughtNeeded = undefined;
|
||||||
|
sequentialThinkingState.thoughtNumber = undefined;
|
||||||
|
|
||||||
// Create initial reasoning entry with loading status
|
// Create initial reasoning entry with loading status
|
||||||
const reasoningEntry = createSequentialThinkingReasoningMessage(
|
const reasoningEntry = createSequentialThinkingReasoningMessage(
|
||||||
|
|
|
@ -11,8 +11,10 @@ export function createDashboardsStart(
|
||||||
state: CreateDashboardsState
|
state: CreateDashboardsState
|
||||||
) {
|
) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
state.startTime = Date.now();
|
state.argsText = undefined;
|
||||||
|
state.files = [];
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
|
@ -11,8 +11,10 @@ export function createModifyDashboardsStart(
|
||||||
state: ModifyDashboardsState
|
state: ModifyDashboardsState
|
||||||
) {
|
) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
state.startTime = Date.now();
|
state.argsText = undefined;
|
||||||
|
state.files = [];
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
|
@ -9,6 +9,9 @@ import {
|
||||||
export function createCreateMetricsStart(context: CreateMetricsContext, state: CreateMetricsState) {
|
export function createCreateMetricsStart(context: CreateMetricsContext, state: CreateMetricsState) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
|
state.argsText = undefined;
|
||||||
|
state.files = [];
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
|
@ -8,7 +8,10 @@ import type { ModifyMetricsContext, ModifyMetricsState } from './modify-metrics-
|
||||||
|
|
||||||
export function createModifyMetricsStart(context: ModifyMetricsContext, state: ModifyMetricsState) {
|
export function createModifyMetricsStart(context: ModifyMetricsContext, state: ModifyMetricsState) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
state.argsText = undefined;
|
||||||
|
state.files = [];
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
|
@ -8,7 +8,10 @@ import {
|
||||||
|
|
||||||
export function createReportsStart(context: CreateReportsContext, state: CreateReportsState) {
|
export function createReportsStart(context: CreateReportsContext, state: CreateReportsState) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
state.argsText = undefined;
|
||||||
|
state.files = [];
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
|
@ -8,7 +8,15 @@ import type { ModifyReportsContext, ModifyReportsState } from './modify-reports-
|
||||||
|
|
||||||
export function modifyReportsStart(context: ModifyReportsContext, state: ModifyReportsState) {
|
export function modifyReportsStart(context: ModifyReportsContext, state: ModifyReportsState) {
|
||||||
return async (options: ToolCallOptions) => {
|
return async (options: ToolCallOptions) => {
|
||||||
|
// Reset state for new tool call to prevent contamination from previous calls
|
||||||
state.toolCallId = options.toolCallId;
|
state.toolCallId = options.toolCallId;
|
||||||
|
state.argsText = undefined;
|
||||||
|
state.reportId = undefined;
|
||||||
|
state.reportName = undefined;
|
||||||
|
state.edits = [];
|
||||||
|
state.currentContent = undefined;
|
||||||
|
state.finalContent = undefined;
|
||||||
|
state.version_number = undefined;
|
||||||
state.startTime = Date.now();
|
state.startTime = Date.now();
|
||||||
|
|
||||||
if (context.messageId) {
|
if (context.messageId) {
|
||||||
|
|
Loading…
Reference in New Issue