Skip to content

668.1-handle-consistency Make prompt pull accept same handle formats as prompt get #669

@codekiln

Description

@codekiln

Problem

langstar prompt pull and langstar prompt get accept different handle formats, causing confusion.

Current behavior:

# Works with prompt get
langstar prompt get my-prompt  # ✅ Success

# Fails with prompt pull
langstar prompt pull my-prompt  # ❌ Error: Invalid handle format. Expected: owner/repo-name

This is inconsistent and forces users to remember which command accepts which format.

Expected Behavior

Both commands should accept all three handle format types:

  1. Short handle (private prompts): prompt-name → prepends -/
  2. Full handle: owner/prompt-name
  3. UUID: 8fc72dfc-6213-4048-b025-0156b1b735ff

Implementation Tasks

  • Update prompt pull to use same handle parsing logic as prompt get
  • Update prompt pull help text to document all accepted formats
  • Add integration tests verifying all three formats work
  • Update error messages to show accepted formats

Code Location

  • File: cli/src/commands/prompt.rs
  • Current implementation: prompt get already has the flexible parsing logic
  • Target: Apply same logic to prompt pull

Testing

# All of these should work:
langstar prompt pull my-prompt                              # short handle
langstar prompt pull langchain-ai/rag-prompt                # full handle
langstar prompt pull 8fc72dfc-6213-4048-b025-0156b1b735ff  # UUID

# Verify help text documents all formats
langstar prompt pull --help

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    readyready for work - next action

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions