Skip to content

Commit e4250ad

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
Merge staging into compact Popover treatment
2 parents 133dee5 + d8e7e92 commit e4250ad

303 files changed

Lines changed: 45103 additions & 2016 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.

‎.agents/skills/add-connector/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ argument-hint: <service-name> [api-docs-url]
88

99
## Choose the connector runtime first
1010

11-
For **Sim Search**, use the live provider workflow in [the federated Search developer guide](../../../apps/sim/lib/sim-search/live/README.md#adding-a-live-search-connector). Its browser-safe provider catalog owns provider IDs, API origins, credential aliases, and account modes; its typed runtime registry requires both search and read handlers. `ConnectorMeta` remains the owner of logos and setup fields. Member mode has no admin resource filters. Service mode requires independent live source verification and shared selectors. Do not implement a Search source by adding a crawler, embeddings, or a scheduled ACL build.
11+
For **Sim Search**, use the live provider workflow in [the federated Search developer guide](../../../apps/sim/lib/sim-search/live/README.md#adding-a-live-search-connector). Its browser-safe provider catalog owns provider IDs, API origins, credential aliases, and account modes; its typed runtime registry requires both search and read handlers. `ConnectorMeta` remains the owner of logos and setup fields. Member mode has no admin resource filters. Service mode requires independent live source verification; resource pickers use shared selectors with canonical manual-input pairs, and plain inputs are fine where no picker applies. Do not implement a Search source by adding a crawler, embeddings, or a scheduled ACL build.
1212

1313
The ingestion instructions below apply to **ordinary knowledge-base connectors** and the explicit legacy Search backend (`SIM_SEARCH_LIVE=false`). If a provider supports both, implement and test both runtimes; adding `search: true` to metadata alone does not implement federated search. Preserve indexing documentation and behavior for those KB/legacy callers.
1414

‎.claude/rules/sim-settings-pages.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,12 @@ and — on activatable rows only — the hover band. Never hand-roll any of it,
252252

253253

254254
**One member avatar.** Every member list, owner cell, and ranking renders emcn
255-
`<Avatar size='xs' name={…} src={…} aria-hidden />` — a 14px photo, or the initial
256-
on the neutral disc (`aria-hidden` because the name is always beside it). Never
257-
hand-roll an avatar or give a person a `getUserColor` hash; per-person colors
258-
belong to live collaboration (presence, cursors), where the color matches that
259-
person's cursor.
255+
`<Avatar size='xs' name={…} src={…} />` — a 14px photo, or the initial on the
256+
neutral disc. Pass `aria-hidden` only when the member's name is visibly rendered
257+
beside it; an email-only row (`MemberRow`) keeps the avatar labelled because it
258+
carries the name. Never hand-roll an avatar or give a person a `getUserColor`
259+
hash; per-person colors belong to live collaboration (presence, cursors), where
260+
the color matches that person's cursor.
260261

261262
## Header action order
262263

‎.cursor/rules/sim-settings-pages.mdc‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,12 @@ and — on activatable rows only — the hover band. Never hand-roll any of it,
249249

250250

251251
**One member avatar.** Every member list, owner cell, and ranking renders emcn
252-
`<Avatar size='xs' name={…} src={…} aria-hidden />` — a 14px photo, or the initial
253-
on the neutral disc (`aria-hidden` because the name is always beside it). Never
254-
hand-roll an avatar or give a person a `getUserColor` hash; per-person colors
255-
belong to live collaboration (presence, cursors), where the color matches that
256-
person's cursor.
252+
`<Avatar size='xs' name={…} src={…} />` — a 14px photo, or the initial on the
253+
neutral disc. Pass `aria-hidden` only when the member's name is visibly rendered
254+
beside it; an email-only row (`MemberRow`) keeps the avatar labelled because it
255+
carries the name. Never hand-roll an avatar or give a person a `getUserColor`
256+
hash; per-person colors belong to live collaboration (presence, cursors), where
257+
the color matches that person's cursor.
257258

258259
## Header action order
259260

‎apps/desktop/src/main/browser-agent/page-functions.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,21 @@ describe('collectSnapshot', () => {
912912
expect(captured.input.ownerDocument).toBe(document)
913913
})
914914

915+
it('climbs out of a shadow root inside a same-origin frame to find the file input', () => {
916+
const frame = document.createElement('iframe')
917+
document.body.append(frame)
918+
const childDocument = frame.contentDocument as Document
919+
childDocument.body.innerHTML = '<div id="host"></div><input type="file">'
920+
const host = childDocument.getElementById('host') as HTMLElement
921+
const button = childDocument.createElement('button')
922+
host.attachShadow({ mode: 'open' }).append(button)
923+
const input = childDocument.querySelector('input') as HTMLInputElement
924+
register(button)
925+
926+
expect(button.getRootNode()).not.toBeInstanceOf(ShadowRoot)
927+
expect(resolveFileInputTarget(0)).toEqual({ input, document: childDocument })
928+
})
929+
915930
it('refuses a disconnected or stale upload reference', () => {
916931
const input = document.createElement('input')
917932
input.type = 'file'

‎apps/desktop/src/main/browser-agent/page-functions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3348,7 +3348,7 @@ export function resolveFileInputTarget(id: number): {
33483348
)
33493349
if (candidates.length === 1) input = candidates[0]
33503350
const root = scope.getRootNode()
3351-
scope = scope.parentElement ?? (root instanceof ShadowRoot ? root.host : null)
3351+
scope = scope.parentElement ?? ('host' in root ? (root.host as Element) : null)
33523352
}
33533353
if (!input) throw new Error('The selected element has no nearby file input.')
33543354
if (input.matches(':disabled')) throw new Error('The file input is disabled.')

‎apps/docs/content/docs/integrations/embeddings.mdx‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ Generate embeddings from text using OpenAI's embedding models
5151

5252
| Parameter | Type | Description |
5353
| --------- | ---- | ----------- |
54-
| `embeddings` | json | Generated embeddings |
54+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
5555
| `model` | string | Model used |
5656
| `provider` | string | Provider used |
57-
| `dimensions` | number | Dimensionality of each vector |
57+
| `dimensions` | number | Dimensionality of each returned vector |
5858
| `usage` | json | Token usage |
59+
| ↳ `prompt_tokens` | number | Tokens in the input |
60+
| ↳ `total_tokens` | number | Total tokens billed |
5961

6062
### OpenRouter Embeddings
6163

@@ -75,11 +77,13 @@ Generate embeddings through OpenRouter
7577

7678
| Parameter | Type | Description |
7779
| --------- | ---- | ----------- |
78-
| `embeddings` | json | Generated embeddings |
80+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
7981
| `model` | string | Model used |
8082
| `provider` | string | Provider used |
81-
| `dimensions` | number | Dimensionality of each vector |
83+
| `dimensions` | number | Dimensionality of each returned vector |
8284
| `usage` | json | Token usage |
85+
| ↳ `prompt_tokens` | number | Tokens in the input |
86+
| ↳ `total_tokens` | number | Total tokens billed |
8387

8488
### Gemini Embeddings
8589

@@ -99,11 +103,13 @@ Generate embeddings from text using Google's Gemini embedding models
99103

100104
| Parameter | Type | Description |
101105
| --------- | ---- | ----------- |
102-
| `embeddings` | json | Generated embeddings |
106+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
103107
| `model` | string | Model used |
104108
| `provider` | string | Provider used |
105-
| `dimensions` | number | Dimensionality of each vector |
109+
| `dimensions` | number | Dimensionality of each returned vector |
106110
| `usage` | json | Token usage |
111+
| ↳ `prompt_tokens` | number | Tokens in the input |
112+
| ↳ `total_tokens` | number | Total tokens billed |
107113

108114
### Cohere Embeddings
109115

@@ -123,11 +129,13 @@ Generate embeddings from text using Cohere's embedding models
123129

124130
| Parameter | Type | Description |
125131
| --------- | ---- | ----------- |
126-
| `embeddings` | json | Generated embeddings |
132+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
127133
| `model` | string | Model used |
128134
| `provider` | string | Provider used |
129-
| `dimensions` | number | Dimensionality of each vector |
135+
| `dimensions` | number | Dimensionality of each returned vector |
130136
| `usage` | json | Token usage |
137+
| ↳ `prompt_tokens` | number | Tokens in the input |
138+
| ↳ `total_tokens` | number | Total tokens billed |
131139

132140
### Mistral Embeddings
133141

@@ -147,11 +155,13 @@ Generate embeddings from text using Mistral's embedding models
147155

148156
| Parameter | Type | Description |
149157
| --------- | ---- | ----------- |
150-
| `embeddings` | json | Generated embeddings |
158+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
151159
| `model` | string | Model used |
152160
| `provider` | string | Provider used |
153-
| `dimensions` | number | Dimensionality of each vector |
161+
| `dimensions` | number | Dimensionality of each returned vector |
154162
| `usage` | json | Token usage |
163+
| ↳ `prompt_tokens` | number | Tokens in the input |
164+
| ↳ `total_tokens` | number | Total tokens billed |
155165

156166
### Ollama Embeddings
157167

@@ -168,10 +178,12 @@ Generate embeddings on a self-hosted Ollama server
168178

169179
| Parameter | Type | Description |
170180
| --------- | ---- | ----------- |
171-
| `embeddings` | json | Generated embeddings |
181+
| `embeddings` | json | Generated embedding vectors, one per input, in input order |
172182
| `model` | string | Model used |
173183
| `provider` | string | Provider used |
174-
| `dimensions` | number | Dimensionality of each vector |
184+
| `dimensions` | number | Dimensionality of each returned vector |
175185
| `usage` | json | Token usage |
186+
| ↳ `prompt_tokens` | number | Tokens in the input |
187+
| ↳ `total_tokens` | number | Total tokens billed |
176188

177189

0 commit comments

Comments
 (0)