Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion commands/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package commands

import (
"bytes"
"strings"
"time"

"github.com/docker/go-units"
Expand Down Expand Up @@ -50,8 +51,12 @@ func psTable(ps []desktop.BackendStatus) string {
table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)

for _, status := range ps {
modelName := status.ModelName
if strings.HasPrefix(modelName, "sha256:") {
modelName = modelName[7:19]
}
table.Append([]string{
status.ModelName,
modelName,
status.BackendName,
status.Mode,
units.HumanDuration(time.Since(status.LastUsed)) + " ago",
Expand Down
6 changes: 2 additions & 4 deletions commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,15 @@ func newRunCmd() *cobra.Command {
return fmt.Errorf("unable to initialize standalone model runner: %w", err)
}

modelDetail, err := desktopClient.Inspect(model, false)
_, err := desktopClient.Inspect(model, false)
if err != nil {
if !errors.Is(err, desktop.ErrNotFound) {
return handleNotRunningError(handleClientError(err, "Failed to list models"))
return handleNotRunningError(handleClientError(err, "Failed to inspect model"))
}
cmd.Println("Unable to find model '" + model + "' locally. Pulling from the server.")
if err := pullModel(cmd, desktopClient, model); err != nil {
return err
}
} else if model != modelDetail.Tags[0] {
model = modelDetail.Tags[0]
}

if prompt != "" {
Expand Down