feat: show a model, agent and duration footer after each turn
Match the first-party chat footer on touch screens: after a turn ends, its last assistant message gets a row with the model name (resolved from /api/model with the id as fallback), the agent and how long the turn took, plus a "more" menu. The menu shows the completion timestamp and offers copy answer and fork from here; forking copies history before the next prompt (or the whole history at the end) and opens the new session. Bump version to 0.1.7 (build 8).
This commit is contained in:
1 parent
56cf889ee9
commit
8268bdecc2
6 files changed
+308
-8
No files matched your search
@@ -172,6 +172,27 @@ func (c *Client) Models(ctx context.Context, directory string) ([]ModelInfo, err
|
||||
return payload.Data, nil
|
||||
}
|
||||
|
||||
// ProviderInfo is one provider the server offers, with its display name.
|
||||
type ProviderInfo struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// Providers lists the providers available for a directory.
|
||||
func (c *Client) Providers(ctx context.Context, directory string) ([]ProviderInfo, error) {
|
||||
q := url.Values{}
|
||||
if directory != "" {
|
||||
q.Set("location[directory]", directory)
|
||||
}
|
||||
var payload struct {
|
||||
Data []ProviderInfo `json:"data"`
|
||||
}
|
||||
if err := c.do(ctx, http.MethodGet, "/api/provider", requestOptions{query: q}, nil, &payload); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return payload.Data, nil
|
||||
}
|
||||
|
||||
// ServerLocation is the server's default working directory.
|
||||
type ServerLocation struct {
|
||||
Directory string `json:"directory"`
|
||||
|
||||
Reference in new issue
Block a user