feat: inline image previews, revert, and the official icon
- sent images keep a local copy and render as rounded thumbnails in the message, surviving later page reloads - a prompt's menu can revert it and everything after it: confirm, then stage and commit the server-side revert - the app icon is OpenChamber's own (packages/mobile/assets/icon-only.png) - document a terminal assessment (native view vs Go ANSI vs xterm.js in a WebView) for the next decision Bump version to 0.2.1 (build 15).
This commit is contained in:
1 parent
72119b73e8
commit
dc3730eba7
9 files changed
+221
-22
No files matched your search
@@ -32,6 +32,20 @@ func (c *Client) Prompt(ctx context.Context, sessionID string, o PromptOptions)
|
||||
return c.do(ctx, http.MethodPost, path, requestOptions{directory: o.Directory}, body, nil)
|
||||
}
|
||||
|
||||
// StageRevert marks a reversible boundary at a message: everything after it
|
||||
// can be dropped with CommitRevert.
|
||||
func (c *Client) StageRevert(ctx context.Context, sessionID, directory, messageID string) error {
|
||||
path := "/api/session/" + url.PathEscape(sessionID) + "/revert/stage"
|
||||
return c.do(ctx, http.MethodPost, path, requestOptions{directory: directory},
|
||||
map[string]any{"messageID": messageID}, nil)
|
||||
}
|
||||
|
||||
// CommitRevert drops the messages a staged revert marked.
|
||||
func (c *Client) CommitRevert(ctx context.Context, sessionID, directory string) error {
|
||||
path := "/api/session/" + url.PathEscape(sessionID) + "/revert/commit"
|
||||
return c.do(ctx, http.MethodPost, path, requestOptions{directory: directory}, map[string]any{}, nil)
|
||||
}
|
||||
|
||||
// ForkSession copies the session's history before a message into a new
|
||||
// session. An empty before copies the whole history.
|
||||
func (c *Client) ForkSession(ctx context.Context, sessionID, directory, before string) (Session, error) {
|
||||
|
||||
Reference in new issue
Block a user