这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@homanp
Copy link
Contributor

@homanp homanp commented Jul 28, 2025

What does this PR do?

This pull request introduces several updates to improve code readability, consistency, and functionality in the @vibe-kit/grok-cli project. The most significant changes include updating the package version, enforcing consistent use of double quotes, restructuring code for better readability, and enhancing the processPromptHeadless function to output OpenAI-compatible messages.

General Improvements:

  • Version Update: Updated the package version in package.json from 0.0.14 to 0.0.16.
  • Consistent Double Quotes: Replaced all single quotes with double quotes across the src/index.ts file for consistent string formatting. [1] [2] [3] [4]

Code Readability Enhancements:

  • Improved Code Formatting: Reformatted long strings and function calls to span multiple lines for better readability. [1] [2] [3]

Functional Enhancements:

  • Enhanced processPromptHeadless Function: Modified the function to convert chat entries into OpenAI-compatible message objects, including support for tool calls. Each message is now output as a separate JSON object, and errors are formatted in OpenAI-compatible style.

Fixes #45

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 28, 2025
@homanp homanp merged commit c7eacf7 into main Jul 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Headless mode should return chat messages output in json format

2 participants