Skip to content

fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files#1147

Merged
waleedlatif1 merged 6 commits intostagingfrom
fix/copilt-cleanup
Aug 27, 2025
Merged

fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files#1147
waleedlatif1 merged 6 commits intostagingfrom
fix/copilt-cleanup

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Aug 27, 2025

Summary

support azure blob upload in copilot, remove dead code & consolidate other copilot files, use azure openai to generate chat title.

Type of Change

  • New feature

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 Aug 27, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 27, 2025 3:07am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 27, 2025 3:07am

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.

Greptile Summary

This PR implements Azure Blob Storage support for the copilot feature while consolidating and cleaning up copilot-related files. The changes introduce a storage-agnostic architecture that supports both S3 and Azure Blob Storage through a unified interface.

Key Changes:

Storage Layer Modernization: The PR updates file attachment schemas from S3-specific s3_key fields to generic key fields across multiple interfaces (MessageFileAttachment, FileAttachment). This change enables the same data structures to work with both S3 and Azure Blob Storage providers.

Unified Storage Client: The storage client abstraction layer is enhanced with custom configuration support, allowing different parts of the application to use different storage providers or configurations. The copilot feature can now leverage Azure Blob Storage through custom configurations while maintaining backward compatibility with S3.

Component Consolidation: Major refactoring extracts inline components from the 620-line copilot-message.tsx file into separate, reusable modules (FileAttachmentDisplay, SmoothStreamingText, StreamingIndicator, ThinkingBlock, WordWrap). This improves maintainability and follows single responsibility principles.

Import Optimization: Multiple files consolidate UI component imports from individual files to barrel exports (@/components/ui), reducing import verbosity and improving code organization.

Chat Title Generation: The generate-chat-title module is enhanced to support both Azure OpenAI and regular OpenAI providers, with environment-based provider selection and improved model configuration (upgraded from GPT-3.5-turbo to GPT-4o, temperature reduced to 0.2).

File Utilities Migration: File handling utilities are moved from copilot-specific locations to a central lib/uploads/file-utils.ts location, making them reusable across the application and removing Anthropic-specific naming conventions.

Dead Code Removal: Extensive logging cleanup removes verbose debug statements from provider execution, agent handlers, and configuration loading while preserving essential error logging.

The changes integrate with the existing workflow execution system, maintaining all current functionality while adding multi-cloud storage capabilities. The architecture now supports provider-agnostic file handling through standardized interfaces and abstraction layers.

Confidence score: 3/5

  • This PR introduces significant architectural changes with potential compatibility risks due to field name changes and default service URL modifications
  • Score reflects concerns about breaking changes (s3_key to key transitions), unsafe type assertions in storage client, and critical default URL change to staging environment
  • Pay close attention to storage-client.ts for type assertion safety, constants.ts for production impact, and all file attachment interfaces for compatibility

23 files reviewed, 7 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 27, 2025 02:52 Inactive
@vercel vercel bot temporarily deployed to Preview – docs August 27, 2025 02:57 Inactive
@vercel vercel bot temporarily deployed to Preview – docs August 27, 2025 03:03 Inactive
@waleedlatif1 waleedlatif1 merged commit 8226e7b into staging Aug 27, 2025
3 of 5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/copilt-cleanup branch August 27, 2025 03:06
waleedlatif1 added a commit that referenced this pull request Aug 27, 2025
…ad code & consolidate other copilot files (#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation
waleedlatif1 added a commit that referenced this pull request Aug 27, 2025
…is for queueing docs in kb (#1143)

* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (#1144)

* feat: added llms.txt and robots.txt (#1145)

* fix(condition-block): edges not following blocks, duplicate issues (#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ad code & consolidate other copilot files (simstudioai#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…is for queueing docs in kb (simstudioai#1143)

* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (simstudioai#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (simstudioai#1144)

* feat: added llms.txt and robots.txt (simstudioai#1145)

* fix(condition-block): edges not following blocks, duplicate issues (simstudioai#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (simstudioai#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (simstudioai#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
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.

1 participant