Blake Mizerany b7f1a395ea cmd: compact pull progress and make client2 the default
This makes client2 the default for the pull command, and updates the
progress output to be more compact and easier to read, omitting details
relevant only to the original client implementation.

Previously, the pull command would show a progress bar for each layer
like this:

	; ollama pull gemma3
	pulling manifest
	pulling aeda25e63ebd... 100% ▕██████████████████████████ 3.3 GB
	pulling e0a42594d802... 100% ▕██████████████████████████  358 B
	pulling dd084c7d92a3... 100% ▕██████████████████████████ 8.4 KB
	pulling 3116c5225075... 100% ▕██████████████████████████   77 B
	pulling b6ae5839783f... 100% ▕██████████████████████████  489 B
	verifying sha256 digest
	writing manifest
	success

This changes the output to look like this:

	; ollama pull gemma3
	Downloading gemma3 123M/4.5G (2.7%)

As a side note, the progress bar is not safe for concurrent use and so
the pull command had race data races. This should fix any data races in
the pull command, but it does not affect any other commands using the
progress package.

Also, move the call to Chunker.Close into a defer statement to ensure it
it is called. Previously, care needed to be taken to ensure there we no
panics, but without 100% control because we called t.update which is
user-defined and could panic.
2025-04-03 23:48:25 -07:00
..
2024-07-26 14:14:48 -07:00
2025-03-28 11:50:22 -07:00
2025-02-13 16:31:21 -08:00