Skip to content

glue login and create command tweaks#32

Merged
Macil merged 7 commits into
masterfrom
chris/createTweaks
Apr 15, 2026
Merged

glue login and create command tweaks#32
Macil merged 7 commits into
masterfrom
chris/createTweaks

Conversation

@Macil
Copy link
Copy Markdown
Contributor

@Macil Macil commented Apr 14, 2026

  • After logging in, suggest glue install-skills command alongside the existing glue create suggestion.
  • Fixed bug in glue create that allowed it to overwrite an existing glue.
  • If glue create doesn't detect any editors, have a better simpler flow suggesting our recommended editors to the user.
  • In glue create, suggest installing agent skills after setting up the new glue.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the editor detection logic in commands/create.ts by removing the manual installation flow and refactoring the detection to use a list of default commands. It also updates the CLI output in commands/login.ts and commands/skills.ts to provide better guidance on installing agent skills. A review comment suggests broadening the support for the EDITOR environment variable to include any installed command rather than restricting it to the hardcoded defaults.

Comment thread commands/create.ts
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 14, 2026

Greptile Summary

This PR makes three UX improvements to the login and create flows: (1) the post-login tip now also mentions glue install-skills; (2) glue create fixes an ordering bug where appendFileExtensionIfNotPresent was called after uniquifyPath, so an existing myGlue.ts wouldn't be detected and the file would be silently overwritten — now fixed with the correct call order plus a { createNew: true } guard; (3) the editor-open flow is simplified — instead of offering to install Cursor when no editor is found, it prints a recommendation message, and promptToInstallSkills is moved to after the file is written.

  • The anyAgentSkillsInstalled helper in commands/skills.ts uses Promise.any to check whether any agent skill is installed, but Promise.any returns the first resolved value rather than the first truthy one — so it can return false even when a later agent in the list does have the skill installed, causing spurious install prompts.

Confidence Score: 4/5

Safe to merge with the Promise.any bug addressed; it causes false-positive skill-install prompts for users who have the Glue skill installed for Claude Code but not Codex.

One P1 logic bug in anyAgentSkillsInstalled (pre-existing but made more prominent by this PR moving promptToInstallSkills to a more user-facing position) and one P2 copy inconsistency. All other changes look correct.

commands/skills.ts — the anyAgentSkillsInstalled function needs a Promise.all + .some(Boolean) fix before the new promptToInstallSkills placement is fully reliable.

Important Files Changed

Filename Overview
commands/create.ts Fixes bug where extension was appended after uniquifyPath (so existing .ts files weren't detected); adds createNew: true guard; simplifies editor detection to return just the command string; drops the install-editor flow in favour of a plain message. One minor inconsistency: zed is in defaultEditors but is absent from the no-editor recommendation message.
commands/login.ts Adds glue install-skills post-login tip alongside the existing glue create tip; trivial copy-only change, looks correct.
commands/skills.ts Adds JSDoc and a console.log preamble to promptToInstallSkills. The underlying anyAgentSkillsInstalled helper uses Promise.any incorrectly — it returns the first fulfilled value, not the first truthy one, so it can return false even when a later agent's skill IS installed.

Comments Outside Diff (1)

  1. commands/skills.ts, line 140-142 (link)

    P1 Promise.any returns first fulfilled value, not first truthy value

    Promise.any short-circuits on the first promise that fulfills, regardless of its value. If the codex check resolves to false first (e.g. because ~/.codex/skills/glue doesn't exist and a missing-directory stat is often faster), Promise.any returns false immediately — even if the claude or generic check would return true. This means promptToInstallSkills will still offer the install prompt to users who already have the skill for Claude Code but not Codex.

    export async function anyAgentSkillsInstalled(home: string): Promise<boolean> {
      const results = await Promise.all(AGENTS.map((agent) => isSkillInstalled(home, agent)));
      return results.some(Boolean);
    }

Reviews (1): Last reviewed commit: "recommend glue install-skills command" | Re-trigger Greptile

@Macil Macil merged commit 70d42fb into master Apr 15, 2026
2 checks passed
@Macil Macil deleted the chris/createTweaks branch April 15, 2026 00:00
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.

1 participant