Skip to content

Commit 1be9844

Browse files
committed
Local test merge of PR anomalyco#203: sync: merge upstream v1.0.200 into integration
2 parents d41b56a + dc0fe19 commit 1be9844

34 files changed

Lines changed: 249 additions & 172 deletions

File tree

‎.github/last-synced-tag‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.198
1+
v1.0.200

‎bun.lock‎

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/app/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencode-ai/app",
3-
"version": "1.0.198",
3+
"version": "1.0.200",
44
"description": "",
55
"type": "module",
66
"exports": {

‎packages/app/public/_headers‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/assets/*.js
2+
Content-Type: application/javascript
3+
4+
/assets/*.mjs
5+
Content-Type: application/javascript
6+
7+
/assets/*.css
8+
Content-Type: text/css
9+
10+
/*.js
11+
Content-Type: application/javascript
12+
13+
/*.mjs
14+
Content-Type: application/javascript
15+
16+
/*.css
17+
Content-Type: text/css

‎packages/app/src/components/file-tree.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useLocal, type LocalFile } from "@/context/local"
22
import { Collapsible } from "@opencode-ai/ui/collapsible"
33
import { FileIcon } from "@opencode-ai/ui/file-icon"
44
import { Tooltip } from "@opencode-ai/ui/tooltip"
5-
import { For, Match, Switch, Show, type ComponentProps, type ParentProps } from "solid-js"
5+
import { For, Match, Switch, type ComponentProps, type ParentProps } from "solid-js"
66
import { Dynamic } from "solid-js/web"
77

88
export default function FileTree(props: {
@@ -57,14 +57,14 @@ export default function FileTree(props: {
5757
"text-text-muted/40": p.node.ignored,
5858
"text-text-muted/80": !p.node.ignored,
5959
// "!text-text": local.file.active()?.path === p.node.path,
60-
"!text-primary": local.file.changed(p.node.path),
60+
// "!text-primary": local.file.changed(p.node.path),
6161
}}
6262
>
6363
{p.node.name}
6464
</span>
65-
<Show when={local.file.changed(p.node.path)}>
66-
<span class="ml-auto mr-1 w-1.5 h-1.5 rounded-full bg-primary/50 shrink-0" />
67-
</Show>
65+
{/* <Show when={local.file.changed(p.node.path)}> */}
66+
{/* <span class="ml-auto mr-1 w-1.5 h-1.5 rounded-full bg-primary/50 shrink-0" /> */}
67+
{/* </Show> */}
6868
</Dynamic>
6969
)
7070

‎packages/app/src/context/global-sync.tsx‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import {
55
type Part,
66
type Config,
77
type Path,
8-
type File,
9-
type FileNode,
108
type Project,
119
type FileDiff,
10+
type File,
11+
type FileNode,
1212
type Todo,
1313
type SessionStatus,
1414
type ProviderListResponse,
@@ -43,15 +43,15 @@ type State = {
4343
todo: {
4444
[sessionID: string]: Todo[]
4545
}
46+
changes: File[]
47+
node: FileNode[]
4648
limit: number
4749
message: {
4850
[sessionID: string]: Message[]
4951
}
5052
part: {
5153
[messageID: string]: Part[]
5254
}
53-
node: FileNode[]
54-
changes: File[]
5555
}
5656

5757
function createGlobalSync() {
@@ -89,11 +89,11 @@ function createGlobalSync() {
8989
session_status: {},
9090
session_diff: {},
9191
todo: {},
92+
changes: [],
93+
node: [],
9294
limit: 10,
9395
message: {},
9496
part: {},
95-
node: [],
96-
changes: [],
9797
})
9898
children[directory] = createStore(globalStore.children[directory])
9999
bootstrapInstance(directory)
@@ -155,8 +155,6 @@ function createGlobalSync() {
155155
session: () => loadSessions(directory),
156156
status: () => sdk.session.status().then((x) => setStore("session_status", x.data!)),
157157
config: () => sdk.config.get().then((x) => setStore("config", x.data!)),
158-
changes: () => sdk.file.status().then((x) => setStore("changes", x.data!)),
159-
node: () => sdk.file.list({ path: "/" }).then((x) => setStore("node", x.data!)),
160158
}
161159
await Promise.all(Object.values(load).map((p) => retry(p).catch((e) => setGlobalStore("error", e))))
162160
.then(() => setStore("ready", true))
@@ -223,13 +221,13 @@ function createGlobalSync() {
223221
break
224222
}
225223
case "session.diff":
226-
setStore("session_diff", event.properties.sessionID, event.properties.diff)
224+
setStore("session_diff", event.properties.sessionID, reconcile(event.properties.diff, { key: "file" }))
227225
break
228226
case "todo.updated":
229-
setStore("todo", event.properties.sessionID, event.properties.todos)
227+
setStore("todo", event.properties.sessionID, reconcile(event.properties.todos))
230228
break
231229
case "session.status": {
232-
setStore("session_status", event.properties.sessionID, event.properties.status)
230+
setStore("session_status", event.properties.sessionID, reconcile(event.properties.status))
233231
break
234232
}
235233
case "message.updated": {
@@ -307,7 +305,10 @@ function createGlobalSync() {
307305
})
308306

309307
async function bootstrap() {
310-
const health = await globalSDK.client.global.health().then((x) => x.data)
308+
const health = await globalSDK.client.global
309+
.health()
310+
.then((x) => x.data)
311+
.catch(() => undefined)
311312
if (!health?.healthy) {
312313
setGlobalStore(
313314
"error",

0 commit comments

Comments
 (0)