Skip to content

Commit d3d6012

Browse files
authored
fix(tools): updated memory block to throw better errors, removed deprecated posthog route, remove deprecated templates & console helpers (#2753)
* fix(tools): updated memory block to throw better errors, removed deprecated posthog route, remove deprecated templates & console helpers * remove isDeployed in favor of deploymentStatus * ack PR comments
1 parent 860610b commit d3d6012

File tree

34 files changed

+71
-666
lines changed

34 files changed

+71
-666
lines changed

apps/docs/components/icons.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4575,3 +4575,22 @@ export function FirefliesIcon(props: SVGProps<SVGSVGElement>) {
45754575
</svg>
45764576
)
45774577
}
4578+
4579+
export function BedrockIcon(props: SVGProps<SVGSVGElement>) {
4580+
return (
4581+
<svg {...props} viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
4582+
<defs>
4583+
<linearGradient id='bedrock_gradient' x1='80%' x2='20%' y1='20%' y2='80%'>
4584+
<stop offset='0%' stopColor='#6350FB' />
4585+
<stop offset='50%' stopColor='#3D8FFF' />
4586+
<stop offset='100%' stopColor='#9AD8F8' />
4587+
</linearGradient>
4588+
</defs>
4589+
<path
4590+
d='M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z'
4591+
fill='url(#bedrock_gradient)'
4592+
fillRule='nonzero'
4593+
/>
4594+
</svg>
4595+
)
4596+
}

apps/docs/content/docs/en/tools/grain.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ Create a webhook to receive recording events
162162
| --------- | ---- | -------- | ----------- |
163163
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
164164
| `hookUrl` | string | Yes | Webhook endpoint URL \(must respond 2xx\) |
165+
| `hookType` | string | Yes | Type of webhook: "recording_added" or "upload_status" |
165166
| `filterBeforeDatetime` | string | No | Filter: recordings before this date |
166167
| `filterAfterDatetime` | string | No | Filter: recordings after this date |
167168
| `filterParticipantScope` | string | No | Filter: "internal" or "external" |
@@ -178,6 +179,7 @@ Create a webhook to receive recording events
178179
| `id` | string | Hook UUID |
179180
| `enabled` | boolean | Whether hook is active |
180181
| `hook_url` | string | The webhook URL |
182+
| `hook_type` | string | Type of hook: recording_added or upload_status |
181183
| `filter` | object | Applied filters |
182184
| `include` | object | Included fields |
183185
| `inserted_at` | string | ISO8601 creation timestamp |

apps/docs/content/docs/en/tools/linear.mdx

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -851,24 +851,6 @@ List all status updates for a project in Linear
851851
| --------- | ---- | ----------- |
852852
| `updates` | array | Array of project updates |
853853

854-
### `linear_create_project_link`
855-
856-
Add an external link to a project in Linear
857-
858-
#### Input
859-
860-
| Parameter | Type | Required | Description |
861-
| --------- | ---- | -------- | ----------- |
862-
| `projectId` | string | Yes | Project ID to add link to |
863-
| `url` | string | Yes | URL of the external link |
864-
| `label` | string | No | Link label/title |
865-
866-
#### Output
867-
868-
| Parameter | Type | Description |
869-
| --------- | ---- | ----------- |
870-
| `link` | object | The created project link |
871-
872854
### `linear_list_notifications`
873855

874856
List notifications for the current user in Linear
@@ -1246,7 +1228,6 @@ Create a new project label in Linear
12461228

12471229
| Parameter | Type | Required | Description |
12481230
| --------- | ---- | -------- | ----------- |
1249-
| `projectId` | string | Yes | The project for this label |
12501231
| `name` | string | Yes | Project label name |
12511232
| `color` | string | No | Label color \(hex code\) |
12521233
| `description` | string | No | Label description |
@@ -1424,12 +1405,12 @@ Create a new project status in Linear
14241405

14251406
| Parameter | Type | Required | Description |
14261407
| --------- | ---- | -------- | ----------- |
1427-
| `projectId` | string | Yes | The project to create the status for |
14281408
| `name` | string | Yes | Project status name |
1409+
| `type` | string | Yes | Status type: "backlog", "planned", "started", "paused", "completed", or "canceled" |
14291410
| `color` | string | Yes | Status color \(hex code\) |
1411+
| `position` | number | Yes | Position in status list \(e.g. 0, 1, 2...\) |
14301412
| `description` | string | No | Status description |
14311413
| `indefinite` | boolean | No | Whether the status is indefinite |
1432-
| `position` | number | No | Position in status list |
14331414

14341415
#### Output
14351416

apps/docs/content/docs/en/tools/posthog.mdx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,6 @@ Capture multiple events at once in PostHog. Use this for bulk event ingestion to
7979
| `status` | string | Status message indicating whether the batch was captured successfully |
8080
| `eventsProcessed` | number | Number of events processed in the batch |
8181

82-
### `posthog_list_events`
83-
84-
List events in PostHog. Note: This endpoint is deprecated but kept for backwards compatibility. For production use, prefer the Query endpoint with HogQL.
85-
86-
#### Input
87-
88-
| Parameter | Type | Required | Description |
89-
| --------- | ---- | -------- | ----------- |
90-
| `personalApiKey` | string | Yes | PostHog Personal API Key \(for authenticated API access\) |
91-
| `region` | string | No | PostHog region: us \(default\) or eu |
92-
| `projectId` | string | Yes | PostHog Project ID |
93-
| `limit` | number | No | Number of events to return \(default: 100, max: 100\) |
94-
| `offset` | number | No | Number of events to skip for pagination |
95-
| `event` | string | No | Filter by specific event name |
96-
| `distinctId` | string | No | Filter by specific distinct_id |
97-
| `before` | string | No | ISO 8601 timestamp - only return events before this time |
98-
| `after` | string | No | ISO 8601 timestamp - only return events after this time |
99-
100-
#### Output
101-
102-
| Parameter | Type | Description |
103-
| --------- | ---- | ----------- |
104-
| `events` | array | List of events with their properties and metadata |
105-
10682
### `posthog_list_persons`
10783

10884
List persons (users) in PostHog. Returns user profiles with their properties and distinct IDs.

apps/docs/content/docs/en/tools/translate.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Send a chat completion request to any supported LLM provider
5353
| `vertexProject` | string | No | Google Cloud project ID for Vertex AI |
5454
| `vertexLocation` | string | No | Google Cloud location for Vertex AI \(defaults to us-central1\) |
5555
| `vertexCredential` | string | No | Google Cloud OAuth credential ID for Vertex AI |
56+
| `bedrockAccessKeyId` | string | No | AWS Access Key ID for Bedrock |
57+
| `bedrockSecretKey` | string | No | AWS Secret Access Key for Bedrock |
58+
| `bedrockRegion` | string | No | AWS region for Bedrock \(defaults to us-east-1\) |
5659

5760
#### Output
5861

apps/sim/app/api/copilot/chat/update-title/route.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

apps/sim/app/api/workflows/[id]/deployments/[version]/revert/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ export async function POST(
7474
loops: deployedState.loops || {},
7575
parallels: deployedState.parallels || {},
7676
lastSaved: Date.now(),
77-
isDeployed: true,
78-
deployedAt: new Date(),
7977
deploymentStatuses: deployedState.deploymentStatuses || {},
8078
})
8179

@@ -88,7 +86,6 @@ export async function POST(
8886
.set({ lastSynced: new Date(), updatedAt: new Date() })
8987
.where(eq(workflow.id, id))
9088

91-
// Sync MCP tools with the reverted version's parameter schema
9289
await syncMcpToolsForWorkflow({
9390
workflowId: id,
9491
requestId,

apps/sim/app/templates/components/template-card.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ function normalizeWorkflowState(input?: any): WorkflowState | null {
106106
lastUpdate: input.lastUpdate,
107107
metadata: input.metadata,
108108
variables: input.variables,
109-
isDeployed: input.isDeployed,
110-
deployedAt: input.deployedAt,
111109
deploymentStatuses: input.deploymentStatuses,
112110
needsRedeployment: input.needsRedeployment,
113111
dragStartPosition: input.dragStartPosition ?? null,

apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ function normalizeWorkflowState(input?: any): WorkflowState | null {
109109
lastUpdate: input.lastUpdate,
110110
metadata: input.metadata,
111111
variables: input.variables,
112-
isDeployed: input.isDeployed,
113-
deployedAt: input.deployedAt,
114112
deploymentStatuses: input.deploymentStatuses,
115113
needsRedeployment: input.needsRedeployment,
116114
dragStartPosition: input.dragStartPosition ?? null,

apps/sim/app/workspace/[workspaceId]/templates/templates.tsx

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useDebounce } from '@/hooks/use-debounce'
1313
import type { WorkflowState } from '@/stores/workflows/workflow/types'
1414

1515
/**
16-
* Template data structure with support for both new and legacy fields
16+
* Template data structure
1717
*/
1818
export interface Template {
1919
/** Unique identifier for the template */
@@ -59,16 +59,6 @@ export interface Template {
5959
isStarred: boolean
6060
/** Whether the current user is a super user */
6161
isSuperUser?: boolean
62-
/** @deprecated Legacy field - use creator.referenceId instead */
63-
userId?: string
64-
/** @deprecated Legacy field - use details.tagline instead */
65-
description?: string | null
66-
/** @deprecated Legacy field - use creator.name instead */
67-
author?: string
68-
/** @deprecated Legacy field - use creator.referenceType instead */
69-
authorType?: 'user' | 'organization'
70-
/** @deprecated Legacy field - use creator.referenceId when referenceType is 'organization' */
71-
organizationId?: string | null
7262
/** Display color for the template card */
7363
color?: string
7464
/** Display icon for the template card */
@@ -107,15 +97,14 @@ export default function Templates({
10797

10898
/**
10999
* Filter templates based on active tab and search query
110-
* Memoized to prevent unnecessary recalculations on render
111100
*/
112101
const filteredTemplates = useMemo(() => {
113102
const query = debouncedSearchQuery.toLowerCase()
114103

115104
return templates.filter((template) => {
116105
const tabMatch =
117106
activeTab === 'your'
118-
? template.userId === currentUserId || template.isStarred
107+
? template.creator?.referenceId === currentUserId || template.isStarred
119108
: activeTab === 'gallery'
120109
? template.status === 'approved'
121110
: template.status === 'pending'
@@ -124,13 +113,7 @@ export default function Templates({
124113

125114
if (!query) return true
126115

127-
const searchableText = [
128-
template.name,
129-
template.description,
130-
template.details?.tagline,
131-
template.author,
132-
template.creator?.name,
133-
]
116+
const searchableText = [template.name, template.details?.tagline, template.creator?.name]
134117
.filter(Boolean)
135118
.join(' ')
136119
.toLowerCase()
@@ -141,7 +124,6 @@ export default function Templates({
141124

142125
/**
143126
* Get empty state message based on current filters
144-
* Memoized to prevent unnecessary recalculations on render
145127
*/
146128
const emptyState = useMemo(() => {
147129
if (debouncedSearchQuery) {
@@ -235,25 +217,20 @@ export default function Templates({
235217
</div>
236218
</div>
237219
) : (
238-
filteredTemplates.map((template) => {
239-
const author = template.author || template.creator?.name || 'Unknown'
240-
const authorImageUrl = template.creator?.profileImageUrl || null
241-
242-
return (
243-
<TemplateCard
244-
key={template.id}
245-
id={template.id}
246-
title={template.name}
247-
author={author}
248-
authorImageUrl={authorImageUrl}
249-
usageCount={template.views.toString()}
250-
stars={template.stars}
251-
state={template.state}
252-
isStarred={template.isStarred}
253-
isVerified={template.creator?.verified || false}
254-
/>
255-
)
256-
})
220+
filteredTemplates.map((template) => (
221+
<TemplateCard
222+
key={template.id}
223+
id={template.id}
224+
title={template.name}
225+
author={template.creator?.name || 'Unknown'}
226+
authorImageUrl={template.creator?.profileImageUrl || null}
227+
usageCount={template.views.toString()}
228+
stars={template.stars}
229+
state={template.state}
230+
isStarred={template.isStarred}
231+
isVerified={template.creator?.verified || false}
232+
/>
233+
))
257234
)}
258235
</div>
259236
</div>

0 commit comments

Comments
 (0)