| Package | Description |
|---|---|
| io.github.easy4j.opencode | |
| io.github.easy4j.opencode.api |
| Modifier and Type | Method and Description |
|---|---|
Session |
OpenCodeClient.createSession(String title)
通过 OpenCode Server HTTP API 创建会话。
|
Session |
OpenCodeClient.forkSession(String sessionId,
String messageId)
从指定消息位置派生新会话,并返回服务端创建的子会话。
|
Session |
OpenCodeClient.getSession(String sessionId)
通过 OpenCode Server HTTP API 获取会话。
|
Session |
OpenCodeClient.shareSession(String sessionId)
为指定会话启用共享,并返回更新后的会话信息。
|
Session |
OpenCodeClient.unshareSession(String sessionId)
取消指定会话的共享状态,并返回更新后的会话信息。
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Session> |
OpenCodeClient.findSessionByTitle(String title)
调用 OpenCode Server 搜索接口查找标题匹配的会话;未命中时返回空结果。
|
List<Session> |
OpenCodeClient.getSessionChildren(String sessionId)
通过 OpenCode Server HTTP API 获取子会话。
|
List<Session> |
OpenCodeClient.listSessions()
通过 OpenCode Server HTTP API 查询会话;无数据时返回空集合。
|
List<Session> |
OpenCodeClient.listSessions(String search,
Integer limit,
Integer start)
通过 OpenCode Server HTTP API 查询会话;无数据时返回空集合。
|
| Modifier and Type | Method and Description |
|---|---|
Session |
OpenCodeHttpClient.createSession(String title)
通过 OpenCode Server HTTP API 创建会话。
|
Session |
OpenCodeHttpClient.createSession(String title,
OpenCodeRequestContext context)
通过 OpenCode Server HTTP API 创建会话。
|
Session |
OpenCodeHttpClient.createSession(String title,
OpenCodeRequestContext context,
HttpCallCancellation cancellation)
通过 OpenCode Server HTTP API 创建会话。
|
Session |
OpenCodeHttpClient.forkSession(String sessionId,
String messageId)
POST /session/:id/fork,从指定 message 处 fork session。 |
Session |
OpenCodeHttpClient.getSession(String sessionId)
通过 OpenCode Server HTTP API 获取会话。
|
Session |
OpenCodeHttpClient.shareSession(String sessionId)
POST /session/:id/share,创建可分享链接。 |
Session |
OpenCodeHttpClient.unshareSession(String sessionId)
DELETE /session/:id/share,取消分享。 |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Session> |
OpenCodeHttpClient.createSessionAsync(String title,
OpenCodeRequestContext context,
HttpCallCancellation cancellation)
异步请求 OpenCode Server 创建会话;网络或解析失败通过返回的 Future 传播。
|
Optional<Session> |
OpenCodeHttpClient.findSessionByTitle(String title)
按 title 精确查找 session。
|
Optional<Session> |
OpenCodeHttpClient.findSessionByTitle(String title,
OpenCodeRequestContext context)
调用 OpenCode Server 搜索接口查找标题匹配的会话;未命中时返回空结果。
|
Optional<Session> |
OpenCodeHttpClient.findSessionByTitle(String title,
OpenCodeRequestContext context,
HttpCallCancellation cancellation)
调用 OpenCode Server 搜索接口查找标题匹配的会话;未命中时返回空结果。
|
List<Session> |
OpenCodeHttpClient.getSessionChildren(String sessionId)
GET /session/:id/children,列出 session 的子(forked)session。 |
List<Session> |
OpenCodeHttpClient.listSessions()
通过 OpenCode Server HTTP API 查询会话;无数据时返回空集合。
|
List<Session> |
OpenCodeHttpClient.listSessions(String search,
Integer limit,
Integer start)
分页/过滤列出 sessions,对齐 Hermes
listSessions(limit, offset, source, includeChildren)。 |
List<Session> |
OpenCodeHttpClient.listSessions(String search,
Integer limit,
Integer start,
OpenCodeRequestContext context)
通过 OpenCode Server HTTP API 查询会话;无数据时返回空集合。
|
CompletableFuture<List<Session>> |
OpenCodeHttpClient.listSessionsAsync(String search,
Integer limit,
Integer start,
OpenCodeRequestContext context,
HttpCallCancellation cancellation)
异步分页列出会话。
|
Copyright © 2026. All rights reserved.