nanocode-cli 0.3.26__tar.gz → 0.3.27__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.3.26
3
+ Version: 0.3.27
4
4
  Summary: A lightweight terminal-based AI coding assistant
5
5
  Author-email: hit9 <hit9@icloud.com>
6
6
  License-Expression: BSD-3-Clause
@@ -51,7 +51,8 @@ from prompt_toolkit.output.defaults import create_output
51
51
  from prompt_toolkit.patch_stdout import patch_stdout
52
52
  from prompt_toolkit.styles import Style
53
53
 
54
- __version__ = "0.3.26"
54
+ __version__ = "0.3.27"
55
+ HTTP_USER_AGENT = "nanocode/" + __version__
55
56
 
56
57
 
57
58
  JsonValue: TypeAlias = Any
@@ -3431,6 +3432,7 @@ class ModelClient:
3431
3432
  headers={
3432
3433
  "Authorization": "Bearer " + config.key,
3433
3434
  "Content-Type": "application/json",
3435
+ "User-Agent": HTTP_USER_AGENT,
3434
3436
  },
3435
3437
  )
3436
3438
  try:
@@ -6239,7 +6241,7 @@ class CommandDispatcher:
6239
6241
  base_url = base_url[: -len("/chat/completions")]
6240
6242
  request = urllib.request.Request(
6241
6243
  base_url + "/models",
6242
- headers={"Authorization": "Bearer " + provider.key},
6244
+ headers={"Authorization": "Bearer " + provider.key, "User-Agent": HTTP_USER_AGENT},
6243
6245
  )
6244
6246
  try:
6245
6247
  with urllib.request.urlopen(request, timeout=3) as response:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.3.26
3
+ Version: 0.3.27
4
4
  Summary: A lightweight terminal-based AI coding assistant
5
5
  Author-email: hit9 <hit9@icloud.com>
6
6
  License-Expression: BSD-3-Clause
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nanocode-cli"
7
- version = "0.3.26"
7
+ version = "0.3.27"
8
8
  description = "A lightweight terminal-based AI coding assistant"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes
File without changes
File without changes
File without changes