@opencode/client 0.0.0-dev-19417 → 0.0.0-dev-19420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -1478,6 +1478,7 @@ export type MessageListInput = {
|
|
|
1478
1478
|
readonly limit?: number | undefined;
|
|
1479
1479
|
readonly order?: "asc" | "desc" | undefined;
|
|
1480
1480
|
readonly cursor?: string | undefined;
|
|
1481
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
1481
1482
|
};
|
|
1482
1483
|
export type MessageListOutput = {
|
|
1483
1484
|
readonly data: ReadonlyArray<SessionMessage.Info>;
|
|
@@ -210,7 +210,7 @@ const adaptGroupSession = (raw) => ({
|
|
|
210
210
|
});
|
|
211
211
|
const EndpointMessageList = (raw) => (input) => preserveEffect()(raw["session.messages"]({
|
|
212
212
|
params: { sessionID: input["sessionID"] },
|
|
213
|
-
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
|
|
213
|
+
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"], type: input["type"] },
|
|
214
214
|
}).pipe(Effect.mapError(mapClientError)));
|
|
215
215
|
const adaptGroupMessage = (raw) => ({ list: EndpointMessageList(raw) });
|
|
216
216
|
const EndpointModelList = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
@@ -548,7 +548,7 @@ export function make(options) {
|
|
|
548
548
|
list: (input, requestOptions) => request({
|
|
549
549
|
method: "GET",
|
|
550
550
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/message`,
|
|
551
|
-
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
|
|
551
|
+
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"], type: input["type"] },
|
|
552
552
|
successStatus: 200,
|
|
553
553
|
declaredStatuses: [400, 401, 404, 500],
|
|
554
554
|
empty: false,
|
|
@@ -5982,17 +5982,26 @@ export type MessageListInput = {
|
|
|
5982
5982
|
readonly limit?: number | undefined;
|
|
5983
5983
|
readonly order?: "asc" | "desc" | undefined;
|
|
5984
5984
|
readonly cursor?: string | undefined;
|
|
5985
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
5985
5986
|
}["limit"];
|
|
5986
5987
|
readonly order?: {
|
|
5987
5988
|
readonly limit?: number | undefined;
|
|
5988
5989
|
readonly order?: "asc" | "desc" | undefined;
|
|
5989
5990
|
readonly cursor?: string | undefined;
|
|
5991
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
5990
5992
|
}["order"];
|
|
5991
5993
|
readonly cursor?: {
|
|
5992
5994
|
readonly limit?: number | undefined;
|
|
5993
5995
|
readonly order?: "asc" | "desc" | undefined;
|
|
5994
5996
|
readonly cursor?: string | undefined;
|
|
5997
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
5995
5998
|
}["cursor"];
|
|
5999
|
+
readonly type?: {
|
|
6000
|
+
readonly limit?: number | undefined;
|
|
6001
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
6002
|
+
readonly cursor?: string | undefined;
|
|
6003
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
6004
|
+
}["type"];
|
|
5996
6005
|
};
|
|
5997
6006
|
export type MessageListOutput = SessionMessagesResponse;
|
|
5998
6007
|
export type ModelListInput = {
|
package/dist/solid/data.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ type OpenCodeEventMap = {
|
|
|
9
9
|
export type CreateDataInput = {
|
|
10
10
|
readonly api: () => OpenCodeClient;
|
|
11
11
|
readonly directory: string;
|
|
12
|
+
/** Raw-message window used for an initial transcript read. Older pages retain their normal size. */
|
|
13
|
+
readonly initialMessageLimit?: () => number;
|
|
12
14
|
readonly event: {
|
|
13
15
|
readonly on: <Type extends OpenCodeEvent["type"]>(type: Type, handler: (event: OpenCodeEventMap[Type]) => void) => () => void;
|
|
14
16
|
readonly listen: (handler: (event: {
|
package/dist/solid/data.js
CHANGED
|
@@ -1426,7 +1426,11 @@ export function createData(config) {
|
|
|
1426
1426
|
},
|
|
1427
1427
|
sync(sessionID) {
|
|
1428
1428
|
return sync.run(`session.message:${sessionID}`, async () => {
|
|
1429
|
-
const response = await api().message.list({
|
|
1429
|
+
const response = await api().message.list({
|
|
1430
|
+
sessionID,
|
|
1431
|
+
limit: config.initialMessageLimit?.() ?? messagePageLimit,
|
|
1432
|
+
order: "desc",
|
|
1433
|
+
});
|
|
1430
1434
|
const fetched = response.data.toReversed();
|
|
1431
1435
|
// Same protection as the pending sync: a re-fetch racing an
|
|
1432
1436
|
// admission must not wipe its local transcript row.
|
|
@@ -1434,9 +1438,11 @@ export function createData(config) {
|
|
|
1434
1438
|
const admitted = new Set((store.session.pending[sessionID] ?? []).flatMap((item) => item.type === "user" || item.type === "synthetic" ? [item.id] : []));
|
|
1435
1439
|
const local = (store.session.message[sessionID] ?? []).filter((item) => !ids.has(item.id) && (outbox.has(item.id) || admitted.has(item.id)));
|
|
1436
1440
|
const messages = local.length === 0 ? fetched : [...fetched, ...local];
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1441
|
+
batch(() => {
|
|
1442
|
+
messageIndex.set(sessionID, new Map(messages.map((message, index) => [message.id, index])));
|
|
1443
|
+
setStore("session", "message", sessionID, reconcile(messages));
|
|
1444
|
+
setStore("session", "messageCursor", sessionID, response.cursor.next ?? undefined);
|
|
1445
|
+
});
|
|
1440
1446
|
});
|
|
1441
1447
|
},
|
|
1442
1448
|
more(sessionID) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/client",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19420",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"typecheck": "tsgo --noEmit"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@opencode/schema": "0.0.0-dev-
|
|
61
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
60
|
+
"@opencode/schema": "0.0.0-dev-19420",
|
|
61
|
+
"@opencode/protocol": "0.0.0-dev-19420"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"effect": "4.0.0-rc.112",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
77
|
-
"@opencode/httpapi-codegen": "0.0.0-dev-
|
|
77
|
+
"@opencode/httpapi-codegen": "0.0.0-dev-19420",
|
|
78
78
|
"@tsconfig/bun": "1.0.9",
|
|
79
79
|
"@types/bun": "1.4.0",
|
|
80
80
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|