-
Notifications
You must be signed in to change notification settings - Fork 823
feat(skill): show GitHub star prompt on first successful generation #778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,13 +27,28 @@ CONFIG_FILE="${SCRIPT_DIR}/config.json" | |
| # Output dir at same level as .claude (go up 4 levels from scripts/) | ||
| OUTPUT_DIR="$(cd "${SCRIPT_DIR}/../../../.." && pwd)/acestep_output" | ||
| DEFAULT_API_URL="http://127.0.0.1:8001" | ||
| STAR_MARKER_FILE="${SCRIPT_DIR}/.first_gen_done" | ||
|
|
||
| # Colors | ||
| RED='\033[0;31m' | ||
| GREEN='\033[0;32m' | ||
| YELLOW='\033[1;33m' | ||
| CYAN='\033[0;36m' | ||
| NC='\033[0m' | ||
| BOLD='\033[1m' | ||
|
|
||
| # Show GitHub star prompt on first successful generation | ||
| show_star_prompt() { | ||
| if [ ! -f "$STAR_MARKER_FILE" ]; then | ||
| touch "$STAR_MARKER_FILE" | ||
| echo "" | ||
| echo -e "${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" | ||
| echo -e "${BOLD} ACE-Step is free and open-source.${NC}" | ||
| echo -e " If you enjoyed this, a ${YELLOW}★ Star${NC} on GitHub means a lot to us!" | ||
| echo -e " ${CYAN}→ https://github.com/ace-step/ACE-Step${NC}" | ||
| echo -e "${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" | ||
| fi | ||
| } | ||
|
|
||
| # Check dependencies | ||
| check_deps() { | ||
|
|
@@ -697,6 +712,7 @@ send_completion_request() { | |
|
|
||
| echo "" | ||
| echo -e "${GREEN}Done! Files saved to: $OUTPUT_DIR${NC}" | ||
| show_star_prompt | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 715 and Line 760 only cover synchronous completion paths. Minimal fix@@
# Save and download
save_result "$job_id" "$response"
download_audios "$api_url" "$job_id" "$result_file"
+ show_star_prompt
rm -f "$result_file"Also applies to: 760-760 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| # Wait for job and download results | ||
|
|
@@ -741,6 +757,7 @@ wait_for_job() { | |
|
|
||
| echo "" | ||
| echo -e "${GREEN}Done! Files saved to: $OUTPUT_DIR${NC}" | ||
| show_star_prompt | ||
| return 0 | ||
| ;; | ||
| 2) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ace-step/ACE-Step-1.5
Length of output: 3433
Don't persist runtime state inside the checked-out scripts directory.
Line 30 places the marker file at
.claude/skills/acestep/scripts/.first_gen_done, and Line 43 writes it unguarded. In read-only or shared installs, the first successful generation fails after saving files becauseset -e(Line 19) treats thetouchfailure as fatal. Move the marker to a user-writable state directory and make marker-write failures non-fatal.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents