Skip to content

Commit 5653710

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
chore(ui): sync destructive buttons with updated modal fields
2 parents 16b81b5 + 4360284 commit 5653710

492 files changed

Lines changed: 175665 additions & 3530 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/sim-imports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ paths:
1313

1414
```typescript
1515
// ✓ Good
16+
import { Chip } from '@sim/emcn'
1617
import { useWorkflowStore } from '@/stores/workflows/store'
17-
import { Button } from '@/components/ui/button'
1818

1919
// ✗ Bad
2020
import { useWorkflowStore } from '../../../stores/workflows/store'

.cursor/rules/sim-imports.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ globs: ["apps/sim/**/*.ts","apps/sim/**/*.tsx"]
1313

1414
```typescript
1515
// ✓ Good
16+
import { Chip } from '@sim/emcn'
1617
import { useWorkflowStore } from '@/stores/workflows/store'
17-
import { Button } from '@/components/ui/button'
1818

1919
// ✗ Bad
2020
import { useWorkflowStore } from '../../../stores/workflows/store'

.github/workflows/test-build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ jobs:
149149
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_auth_scim
150150
run: bunx vitest run --mode integration lib/workspace-files/search/dispatcher.integration.ts
151151

152+
- name: Verify workspace file version history on PostgreSQL 17
153+
working-directory: apps/sim
154+
env:
155+
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_auth_scim
156+
run: bunx vitest run --mode integration lib/uploads/contexts/workspace/__integration__/file-versions.integration.ts
157+
158+
- name: Verify file search trigram estimate against pg_trgm
159+
working-directory: apps/sim
160+
env:
161+
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_auth_scim
162+
run: bunx vitest run --mode integration lib/workspace-files/search/index-plan.integration.ts
163+
152164
- name: Verify SCIM and administration over real HTTP
153165
working-directory: apps/sim
154166
env:
@@ -219,6 +231,8 @@ jobs:
219231
bunx vitest run
220232
lib/table/rows/secret-provenance.postgres.test.ts
221233
lib/memory/message-provenance.postgres.test.ts
234+
lib/memory/conversation-store.postgres.test.ts
235+
lib/memory/summary-store.postgres.test.ts
222236
executor/handlers/agent/memory-harness.postgres.test.ts
223237
224238
- name: Verify Search vector projection upgrade in PostgreSQL
@@ -229,6 +243,7 @@ jobs:
229243
bunx vitest run
230244
script-migrations/0016_backfill_search_vectors.postgres.test.ts
231245
script-migrations/0018_repair_workspace_file_content_revision.postgres.test.ts
246+
script-migrations/0019_tin_keyword_projection.postgres.test.ts
232247
233248
- name: Verify Search progress, pagination, and outbox scheduling in PostgreSQL
234249
working-directory: apps/sim
@@ -246,6 +261,8 @@ jobs:
246261
lib/knowledge/__integration__/stored-document-recovery.integration.ts
247262
lib/knowledge/__integration__/connector-partition-work.integration.ts
248263
lib/knowledge/__integration__/listing-continuation.integration.ts
264+
lib/knowledge/__integration__/member-scope-renewal.integration.ts
265+
lib/knowledge/__integration__/slack-empty-threads.integration.ts
249266
lib/knowledge/__integration__/kb-block-search.integration.ts
250267
lib/core/outbox/service.integration.ts
251268
lib/knowledge/__integration__/connector-upload.integration.ts

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<p align="center">
99
<a href="https://deepwiki.com/simstudioai/sim" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Ask-DeepWiki-E6E6E6?labelColor=C3C3C3&color=E6E6E6" alt="Ask DeepWiki"></a>
10-
<a href="https://cursor.com/link/prompt?text=Help%20me%20set%20up%20Sim%20locally.%20Follow%20these%20steps%3A%0A%0A1.%20First%2C%20verify%20Docker%20is%20installed%20and%20running%3A%0A%20%20%20docker%20--version%0A%20%20%20docker%20info%0A%0A2.%20Clone%20the%20repository%3A%0A%20%20%20git%20clone%20https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim.git%0A%20%20%20cd%20sim%0A%0A3.%20Generate%20required%20secrets%20%28the%20stack%20will%20not%20start%20without%20them%29%3A%0A%20%20%20cat%20%3E%20.env%20%3C%3C%20EOF%0A%20%20%20BETTER_AUTH_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20ENCRYPTION_KEY%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20INTERNAL_API_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20CRON_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20EOF%0A%0A4.%20Start%20the%20services%20with%20Docker%20Compose%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20up%20-d%0A%0A4.%20Wait%20for%20all%20containers%20to%20be%20healthy%20(this%20may%20take%201-2%20minutes)%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20ps%0A%0A5.%20Verify%20the%20app%20is%20accessible%20at%20http%3A%2F%2Flocalhost%3A3000%0A%0AIf%20there%20are%20any%20errors%2C%20help%20me%20troubleshoot%20them.%20Common%20issues%3A%0A-%20Port%203000%2C%203002%2C%20or%205432%20already%20in%20use%0A-%20Docker%20not%20running%0A-%20Insufficient%20memory%20(needs%2012GB%2B%20RAM)%0A%0AFor%20local%20AI%20models%20with%20Ollama%2C%20use%20this%20instead%20of%20step%203%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.ollama.yml%20--profile%20setup%20up%20-d"><img src="https://img.shields.io/badge/Set%20Up%20with-Cursor-E6E6E6?logo=cursor&logoColor=1A1A1A&labelColor=C3C3C3&color=E6E6E6" alt="Set Up with Cursor"></a>
10+
<a href="https://cursor.com/link/prompt?text=Help%20me%20set%20up%20Sim%20locally.%20Follow%20these%20steps%3A%0A%0A1.%20First%2C%20verify%20Docker%20is%20installed%20and%20running%3A%0A%20%20%20docker%20--version%0A%20%20%20docker%20info%0A%0A2.%20Clone%20the%20repository%3A%0A%20%20%20git%20clone%20https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim.git%0A%20%20%20cd%20sim%0A%0A3.%20Generate%20required%20secrets%20%28the%20stack%20will%20not%20start%20without%20them%29%3A%0A%20%20%20cat%20%3E%20.env%20%3C%3C%20EOF%0A%20%20%20BETTER_AUTH_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20ENCRYPTION_KEY%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20INTERNAL_API_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20CRON_SECRET%3D%24%28openssl%20rand%20-hex%2032%29%0A%20%20%20POSTGRES_PASSWORD%3D%24%28openssl%20rand%20-hex%2024%29%0A%20%20%20EOF%0A%0A4.%20Start%20the%20services%20with%20Docker%20Compose%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20up%20-d%0A%0A4.%20Wait%20for%20all%20containers%20to%20be%20healthy%20(this%20may%20take%201-2%20minutes)%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20ps%0A%0A5.%20Verify%20the%20app%20is%20accessible%20at%20http%3A%2F%2Flocalhost%3A3000%0A%0AIf%20there%20are%20any%20errors%2C%20help%20me%20troubleshoot%20them.%20Common%20issues%3A%0A-%20Port%203000%20or%203002%20already%20in%20use%0A-%20Docker%20not%20running%0A-%20Insufficient%20memory%20(needs%2012GB%2B%20RAM)%0A%0AFor%20local%20AI%20models%20with%20Ollama%2C%20use%20this%20instead%20of%20step%203%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.ollama.yml%20--profile%20setup%20up%20-d"><img src="https://img.shields.io/badge/Set%20Up%20with-Cursor-E6E6E6?logo=cursor&logoColor=1A1A1A&labelColor=C3C3C3&color=E6E6E6" alt="Set Up with Cursor"></a>
1111
</p>
1212

1313
<p align="center">

apps/docs/content/docs/academy/agents/memory.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import { AV_MEMORY_WORKFLOW } from '@/components/workflow-preview/academy-video-
1616
<div className="mt-8 grid grid-cols-1 items-start gap-10 lg:grid-cols-[1fr_300px]">
1717
<div>
1818

19-
By default, an agent keeps nothing between runs: every conversation starts completely fresh. The Memory setting changes that: choose Conversation, give it a conversation ID, and everything said under that key is kept and loaded back before the model runs.
19+
By default, an agent keeps nothing between runs: every conversation starts completely fresh. The Memory setting changes that: choose Conversation, give it a conversation ID, and the agent saves the conversation under that key. Later runs load history according to the memory mode and the model's context limits.
20+
21+
When durable tool history is enabled for your workspace, that history also includes completed tool calls and their results or errors. The agent can remember what it did, such as looking up an order, even when the run failed before giving its final answer. See the [Agent block's memory settings](/workflows/blocks/agent#memory) for tool-history and retry behavior.
2022

2123
Uploaded attachments stay linked to the message that included them. Memory stores file references; each later run reads the accessible files again and prepares them for the selected provider. Attachments follow the selected memory window and the source file's storage retention. A replay can include up to 20 attachment references; use a smaller memory window for longer file-heavy conversations. Files omitted by older versions of memory need to be attached again.
2224

@@ -32,7 +34,7 @@ Uploaded attachments stay linked to the message that included them. Memory store
3234
},
3335
{
3436
title: 'Recall happens before the model runs',
35-
body: 'On the next run, everything stored under the key is loaded back into the conversation first: so the agent answers like no time has passed.',
37+
body: 'On the next run, selected history under the key is loaded into the conversation before the model answers.',
3638
},
3739
{
3840
title: 'Keys are separate threads',
@@ -65,20 +67,22 @@ Here is the agent from the video with Memory set on the block:
6567

6668
## The same agent, with and without memory
6769

68-
The video runs the same agent twice, side by side: once with no memory and once with the conversation ID. The same follow-up question arrives in both. Without the key, the agent starts from zero and has to ask for everything again; with it, everything stored under the key was loaded back before the model saw the new message, and the answer picks up exactly where yesterday stopped.
70+
The video runs the same agent twice, side by side: once with no memory and once with the conversation ID. The same follow-up question arrives in both. Without the key, the agent starts from zero and has to ask for everything again; with it, the earlier conversation supplies the context needed to answer the follow-up.
6971

7072
## When conversations grow
7173

7274
Memory can also be a sliding window, keeping the most recent messages, or the most recent tokens, while the oldest quietly fall away. The stored transcript keeps every turn; the window controls how much of it rides into the model on each run.
7375

76+
Tool exchanges stay together when history is selected. They do not each count as a message in a message window, but their contents still use input tokens. Large results may appear as previews, and history is not automatically summarized. A token window gives more direct control over recalled context than a message count; neither setting caps the total cost of a run that makes further model or tool calls.
77+
7478
## When to use memory
7579

7680
Enable memory when a follow-up needs earlier conversation context, such as a support ticket or sales conversation. Keep classification and extraction stateless when each input contains everything the task needs.
7781

7882
<FAQ items={[
79-
{ question: "What memory modes does the Agent block support?", answer: "Conversation keeps every turn under a conversation ID. Sliding window (messages) keeps the most recent messages, and sliding window (tokens) keeps as much recent history as fits a token budget." },
83+
{ question: "What memory modes does the Agent block support?", answer: "Conversation recalls stored history subject to history-loading and model context limits. Sliding window (messages) selects the most recent messages, and sliding window (tokens) selects recent history against a token budget. Tool-call groups stay together." },
8084
{ question: "What should I use as a conversation ID?", answer: "Any stable key that identifies the thread: a customer ID, a ticket number, a channel ID. Runs that share the key share the conversation; runs with different keys never see each other's history." },
81-
{ question: "Does agent memory cost extra tokens?", answer: "Recalled history is loaded into the model's context, so it is billed as input tokens like any other message. Sliding-window modes exist to cap that cost on long-running conversations." },
85+
{ question: "Does agent memory cost extra tokens?", answer: "Recalled messages, tool arguments, and tool results use input tokens. Sliding-window modes reduce how much history is recalled, but a message count is not a token limit and a memory window does not cap the total cost of the run." },
8286
{ question: "Where is the conversation stored?", answer: "In your Sim workspace, as a stored transcript per conversation ID. You can inspect it, and the agent reads from it automatically before each run." },
8387
]} />
8488

apps/docs/content/docs/cli/files.mdx

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,163 @@ sim files delete <fileId> [options]
174174

175175
</CommandTable>
176176

177+
## Permanently delete a previous version of a file
178+
179+
```bash
180+
sim files versions delete <fileId> <version> [options]
181+
```
182+
183+
**Arguments**
184+
185+
<CommandTable>
186+
187+
| Argument | Required | Description |
188+
| --- | --- | --- |
189+
| `fileId` | Yes | File identifier. |
190+
| `version` | Yes | Version number. |
191+
192+
</CommandTable>
193+
194+
**Options**
195+
196+
<CommandTable>
197+
198+
| Option | Required | Description |
199+
| --- | --- | --- |
200+
| `-y, --yes` | Yes | Confirm this operation. |
201+
202+
</CommandTable>
203+
204+
## Show the metadata of one version of a file
205+
206+
```bash
207+
sim files versions describe <fileId> <version>
208+
```
209+
210+
**Arguments**
211+
212+
<CommandTable>
213+
214+
| Argument | Required | Description |
215+
| --- | --- | --- |
216+
| `fileId` | Yes | File identifier. |
217+
| `version` | Yes | Version number. |
218+
219+
</CommandTable>
220+
221+
## List the recorded versions of a file
222+
223+
```bash
224+
sim files versions list <fileId> [options]
225+
```
226+
227+
**Arguments**
228+
229+
<CommandTable>
230+
231+
| Argument | Required | Description |
232+
| --- | --- | --- |
233+
| `fileId` | Yes | File identifier. |
234+
235+
</CommandTable>
236+
237+
**Options**
238+
239+
<CommandTable>
240+
241+
| Option | Required | Description |
242+
| --- | --- | --- |
243+
| `--sort-by <value>` | No | Field used to sort the result. Accepted values: `version`. |
244+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
245+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
246+
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |
247+
248+
</CommandTable>
249+
250+
## Read the text content of one version of a file
251+
252+
```bash
253+
sim files versions read <fileId> <version> [options]
254+
```
255+
256+
**Arguments**
257+
258+
<CommandTable>
259+
260+
| Argument | Required | Description |
261+
| --- | --- | --- |
262+
| `fileId` | Yes | File identifier. |
263+
| `version` | Yes | Version number. |
264+
265+
</CommandTable>
266+
267+
**Options**
268+
269+
<CommandTable>
270+
271+
| Option | Required | Description |
272+
| --- | --- | --- |
273+
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
274+
| `--offset <value>` | No | First line to return, 1-based. Absent starts at the first line. |
275+
| `--limit <value>` | No | How many lines to return from `offset`. Absent reads to the end. |
276+
277+
</CommandTable>
278+
279+
## Make a previous version of a file current again
280+
281+
```bash
282+
sim files versions revert <fileId> <version> [options]
283+
```
284+
285+
**Arguments**
286+
287+
<CommandTable>
288+
289+
| Argument | Required | Description |
290+
| --- | --- | --- |
291+
| `fileId` | Yes | File identifier. |
292+
| `version` | Yes | Version number. |
293+
294+
</CommandTable>
295+
296+
**Options**
297+
298+
<CommandTable>
299+
300+
| Option | Required | Description |
301+
| --- | --- | --- |
302+
| `--expected-current-version <value>` | No | Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number. |
303+
304+
</CommandTable>
305+
306+
## Download the content of one version of a file
307+
308+
```bash
309+
sim files versions download <fileId> <version> [options]
310+
```
311+
312+
**Arguments**
313+
314+
<CommandTable>
315+
316+
| Argument | Required | Description |
317+
| --- | --- | --- |
318+
| `fileId` | Yes | File identifier. |
319+
| `version` | Yes | Version number. |
320+
321+
</CommandTable>
322+
323+
**Options**
324+
325+
<CommandTable>
326+
327+
| Option | Required | Description |
328+
| --- | --- | --- |
329+
| `-o, --output-file <path>` | No | Write content to a file instead of stdout. |
330+
| `--force` | No | Overwrite --output-file if it already exists. |
331+
332+
</CommandTable>
333+
177334
## Apply one exact or anchor-based edit to a text file
178335

179336
```bash

0 commit comments

Comments
 (0)