Skip to content

feat(cli): add tip system for ConnectOnion CLI#101

Open
lustsazeus-lab wants to merge 1 commit intoopenonion:mainfrom
lustsazeus-lab:main
Open

feat(cli): add tip system for ConnectOnion CLI#101
lustsazeus-lab wants to merge 1 commit intoopenonion:mainfrom
lustsazeus-lab:main

Conversation

@lustsazeus-lab
Copy link
Copy Markdown

Summary

Added a tip/hint system to the ConnectOnion CLI that shows users helpful tips after command execution.

Changes

New file: connectonion/cli/tips.py

  • 17 tips covering major features:
    • Feature discovery (xray, events, managed keys, multi-agent, integrations, TUI)
    • Best practices (type hints, docstrings, Pydantic)
    • Shortcuts (-b flag, --quiet, --version)
    • Community (Discord, GitHub, X)
  • Contextual tips based on command
  • Non-repeating tip rotation (saves state to ~/.co/tips_seen.json)
  • Config file support (~/.co/config.toml with tips = true/false)
  • --quiet/-q flag support

Modified: connectonion/cli/main.py

  • Added --quiet/-q global option
  • Added tips import and show_tip() call after command execution

Example Output

$ co create my-agent
✅ Created my-agent with Minimal template

💡 Tip: Use @xray decorator on any tool to pause and inspect agent state during execution.
    Learn more: docs.connectonion.com/xray

Acceptance Criteria

  • Tips show after successful CLI commands
  • Tips are contextual (relevant to the command just run)
  • Tips dont repeat until all tips have been shown
  • Tips can be disabled via config
  • --quiet suppresses tips
  • Tips include a docs link
  • At least 15 tips covering major features

Bounty: CLI tip system ($5)

- Created connectonion/cli/tips.py with:
  - 17 tips covering major features
  - Contextual tips based on command
  - Non-repeating tip rotation
  - Config file support (tips = true/false)
  - --quiet flag support
- Modified main.py to:
  - Import tips module
  - Add --quiet/-q global option
  - Show tips after command execution
- Tips show after successful commands
- Tips include docs links

Bounty: CLI tip system ()
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e240fc778

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

last_index = data.get("index", 0)

# Find unseen tips
unseen = [t for t in matching_tips if id(t) not in seen_ids]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Persist stable tip IDs across CLI runs

The seen-tip tracking uses id(t) as the persisted identifier, but object IDs are process-memory addresses and are not stable between separate CLI invocations. Since tips_seen.json is read on later runs, previously saved IDs won't match current TIPS entries, so tips can repeat immediately instead of honoring the non-repeating rotation requirement. Use a deterministic ID (for example, an explicit field or list index) when saving and checking seen tips.

Useful? React with 👍 / 👎.

# Add a finally callback to show tips after commands
try:
app()
finally:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Show tips only on successful command execution

The tip display runs inside a finally block, so it executes even when app() exits due to parse errors or command failures. That causes success-oriented tips to appear after failed invocations and can interfere with failure-focused CLI output flows. Gate show_tip behind successful completion instead of unconditional execution.

Useful? React with 👍 / 👎.

@wu-changxing
Copy link
Copy Markdown
Collaborator

@lustsazeus-lab pls attach the screenshot of the tips system

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.

2 participants