Skip to content

feat: add provider name support to forge prompt functions#2029

Merged
tusharmath merged 8 commits intotailcallhq:mainfrom
dariuszkowalski-com:feature/add-provider-name-to-prompt
Nov 30, 2025
Merged

feat: add provider name support to forge prompt functions#2029
tusharmath merged 8 commits intotailcallhq:mainfrom
dariuszkowalski-com:feature/add-provider-name-to-prompt

Conversation

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor

Description

Add provider name support to forge prompt functions to display current AI provider information in the shell prompt.

Changes

  • Add prompt_forge_provider_unstyled() and prompt_forge_provider() functions
  • Add prompt_forge_model_provider() to display model@provider format
  • Add Powerlevel9k/10k integration functions for provider segments
  • Update documentation with provider-related environment variables and usage examples
  • Change display format from provider@model to model@provider for better readability

Usage Examples

# Simple ZSH integration
RPROMPT='$(prompt_forge_model_provider)'

# Powerlevel10k integration
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(... forge_model_provider ...)

Testing

Tested with current forge configuration showing glm-4.6@ZaiCoding format correctly.

Fixes # (issue number if applicable)

- Add prompt_forge_provider_unstyled() and prompt_forge_provider() functions
- Add prompt_forge_model_provider() to display model@provider format
- Add Powerlevel9k/10k integration functions for provider segments
- Update documentation with provider-related environment variables and usage examples
- Change display format from provider@model to model@provider for better readability
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Nov 29, 2025
Comment thread shell-plugin/forge.prompt.zsh Outdated
# Example:
# model_provider=$(prompt_forge_model_provider_unstyled)
# RPROMPT="%F{blue}${model_provider}%f"
function prompt_forge_model_provider_unstyled() {
Copy link
Copy Markdown
Collaborator

@tusharmath tusharmath Nov 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit to specialized style for it to be shipped by default. Everyone doesn't want provider+model in their prompts and if they do, they can always compose using the existing functions. I'd suggest we give promitives that developers can use to customize their prompts the way they like, with some basic low level styles options.

@tusharmath tusharmath enabled auto-merge (squash) November 30, 2025 06:17
@tusharmath tusharmath merged commit d0ce9c3 into tailcallhq:main Nov 30, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants