Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • updated memory block to throw better errors,
  • removed deprecated posthog route,
  • remove deprecated templates & console helpers
  • removed isDeployed/deployedAt from WorkflowState type

Type of Change

  • Bug fix
  • Cleanup

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 10, 2026 0:40am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 9, 2026

Greptile Overview

Greptile Summary

Cleans up deprecated features and improves error handling across memory tools, PostHog integration, console store, and workflow state management. Replaces custom error responses with standard throw new Error() in memory tools for better error propagation through the execution layer. Removes the deprecated posthog_list_events tool, clearConsole() method, and unused /api/copilot/chat/update-title route, along with isDeployed and deployedAt fields from the WorkflowState type.

Confidence Score: 4/5

  • Safe cleanup PR with improved error handling; no breaking changes or logic errors identified
  • This PR performs safe cleanup operations. The memory tool error handling improvements use standard throw statements which integrate correctly with the tool execution layer. The removal of block-level validation for role/content is safe because tool-level validation with validateRequiredParametersAfterMerge handles these required fields automatically. All deprecated feature removals (PostHog list_events, clearConsole, copilot route) appear complete across the codebase. The WorkflowState type changes are consistently applied. No logic errors, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/tools/memory/add.ts 4/5 Improved error handling by replacing custom error responses with standard throw statements for better error propagation
apps/sim/blocks/blocks/memory.ts 3/5 Removed block-level validation for role and content; relies on tool-level required field validation which handles these automatically
apps/sim/blocks/blocks/posthog.ts 5/5 Removed deprecated posthog_list_events tool and related UI fields from block configuration
apps/sim/stores/terminal/console/store.ts 5/5 Removed deprecated clearConsole method and cleaned up redundant inline comments
apps/sim/stores/workflows/workflow/types.ts 5/5 Removed deprecated isDeployed and deployedAt fields from WorkflowState interface

Sequence Diagram

sequenceDiagram
    participant Block as Memory Block
    participant Handler as Generic Handler
    participant Tool as Memory Tool
    participant Validator as Validator
    
    Block->>Handler: Execute with params
    Handler->>Tool: Call memory tool
    Tool->>Validator: Validate required params
    alt Missing workspaceId or conversationId
        Validator-->>Tool: Validation fails
        Tool-->>Handler: throw new Error()
        Handler-->>Block: Propagate error
    else Valid params
        Validator-->>Tool: Validation passes
        Tool->>Tool: Execute operation
        Tool-->>Handler: Return success
        Handler-->>Block: Return result
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit d3d6012 into staging Jan 10, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/mem branch January 10, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants