deepctl-cmd-projects 0.2.0__tar.gz → 0.2.1__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: deepctl-cmd-projects
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Projects command for deepctl
5
5
  Author-email: Deepgram <devrel@deepgram.com>
6
6
  Maintainer-email: Deepgram <devrel@deepgram.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deepctl-cmd-projects"
7
- version = "0.2.0" # x-release-please-version
7
+ version = "0.2.1" # x-release-please-version
8
8
  description = "Projects command for deepctl"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -315,7 +315,6 @@ class ProjectsCommand(BaseCommand):
315
315
  try:
316
316
  # Update current profile
317
317
  profile_name = config.profile or "default"
318
- current_profile = config.get_profile(profile_name)
319
318
 
320
319
  # Test if project exists by trying to get it
321
320
  client = DeepgramClient(config, auth_manager)
@@ -329,13 +328,8 @@ class ProjectsCommand(BaseCommand):
329
328
  if not self.confirm("Continue anyway?", default=False):
330
329
  return BaseResult(status="cancelled", message="Cancelled by user")
331
330
 
332
- # Update profile
333
- config.create_profile(
334
- profile_name,
335
- api_key=current_profile.api_key,
336
- project_id=project_id,
337
- base_url=current_profile.base_url,
338
- )
331
+ # Update only the project ID of the profile
332
+ config.update_profile(profile_name, project_id=project_id)
339
333
 
340
334
  status_console.print(
341
335
  f"[green]✓[/green] Default project set to: {project_id}"
@@ -348,4 +342,7 @@ class ProjectsCommand(BaseCommand):
348
342
 
349
343
  except Exception as e:
350
344
  status_console.print(f"[red]Failed to set default project:[/red] {e}")
345
+ from deepctl_core.output import print_error_hint
346
+
347
+ print_error_hint(e)
351
348
  return BaseResult(status="error", message=str(e))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepctl-cmd-projects
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Projects command for deepctl
5
5
  Author-email: Deepgram <devrel@deepgram.com>
6
6
  Maintainer-email: Deepgram <devrel@deepgram.com>