mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 05:29:53 +00:00
wip: better desktop file status state and timeline
This commit is contained in:
parent
945de4eddc
commit
b207ed2b7b
7 changed files with 288 additions and 159 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import type { Message, Agent, Provider, Session, Part, Config, Path, File, FileNode } from "@opencode-ai/sdk"
|
||||
import { createStore, produce, reconcile } from "solid-js/store"
|
||||
import { createContext, Show, useContext, type ParentProps } from "solid-js"
|
||||
import { createContext, createMemo, Show, useContext, type ParentProps } from "solid-js"
|
||||
import { useSDK, useEvent } from "@/context"
|
||||
import { Binary } from "@/utils/binary"
|
||||
|
||||
|
|
@ -113,6 +113,9 @@ function init() {
|
|||
|
||||
Promise.all(Object.values(load).map((p) => p())).then(() => setStore("ready", true))
|
||||
|
||||
const sanitizer = createMemo(() => new RegExp(`${store.path.directory}/`, "g"))
|
||||
const sanitize = (text: string) => text.replace(sanitizer(), "")
|
||||
|
||||
return {
|
||||
data: store,
|
||||
set: setStore,
|
||||
|
|
@ -143,6 +146,7 @@ function init() {
|
|||
},
|
||||
},
|
||||
load,
|
||||
sanitize,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue