Skip to content

Migrate block comment commands to actions#2171

Draft
FireChickenProductivity wants to merge 28 commits into
talonhub:mainfrom
FireChickenProductivity:migrate-block-comments-to-actions
Draft

Migrate block comment commands to actions#2171
FireChickenProductivity wants to merge 28 commits into
talonhub:mainfrom
FireChickenProductivity:migrate-block-comments-to-actions

Conversation

@FireChickenProductivity
Copy link
Copy Markdown
Contributor

@FireChickenProductivity FireChickenProductivity commented Mar 29, 2026

Migrate block comment commands to use actions. I fixed one of the commands not always making the comment on a single line as a side effect of the snippet migration.

The differences between these commands are not very clear from the names. There is stuff to improve here, but I would prefer to make this PR just a migration.

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: 1d5a7c1c73

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread lang/tags/comment_block.py Outdated
@FireChickenProductivity FireChickenProductivity marked this pull request as draft March 29, 2026 01:33
@FireChickenProductivity FireChickenProductivity marked this pull request as ready for review March 29, 2026 01:42
@auscompgeek
Copy link
Copy Markdown
Collaborator

Is the plan to convert these to snippets in a follow up PR?

@FireChickenProductivity
Copy link
Copy Markdown
Contributor Author

Is the plan to convert these to snippets in a follow up PR?

There are no followup plans yet. Suggestions are welcome. This PR is mostly to satisfy an ancient todo comment.

Copy link
Copy Markdown
Collaborator

@nriley nriley left a comment

Choose a reason for hiding this comment

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

From the community backlog session — makes sense as a first step, migrating the implementations from voice commands to actions. Could you please rename all the new actions to start with code_block_? Also for the actions that include a new optional argument, can you use snippet insertion or a single insert to insert both the comment delimiters and contents in a single action? Thanks!

@FireChickenProductivity
Copy link
Copy Markdown
Contributor Author

From the community backlog session — makes sense as a first step, migrating the implementations from voice commands to actions. Could you please rename all the new actions to start with code_block_? Also for the actions that include a new optional argument, can you use snippet insertion or a single insert to insert both the comment delimiters and contents in a single action? Thanks!

What about instead using code_comment_block as the action prefix to be consistent with the original actions?

@FireChickenProductivity FireChickenProductivity marked this pull request as draft April 17, 2026 03:39
@FireChickenProductivity
Copy link
Copy Markdown
Contributor Author

There was no clear way to do the c like block comment insertion in a single insert without changing behavior. We may want to leave updating that one for a snippet migration follow up.

@FireChickenProductivity FireChickenProductivity marked this pull request as ready for review April 18, 2026 15:55
@FireChickenProductivity FireChickenProductivity marked this pull request as draft April 18, 2026 15:55
@FireChickenProductivity FireChickenProductivity marked this pull request as ready for review April 18, 2026 15:59
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: eceb6cf3ba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread core/snippets/snippets_insert.py Outdated
Comment thread lang/tags/comment_block.py Outdated
substitutions = None
if text is not None:
substitutions = {"0": text}
actions.user.insert_snippet_by_name("commentBlock", substitutions)
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 Insert dictated block-comment text literally

Routing code_comment_block(text) through snippet substitutions changes dictation handling from literal insertion to regex replacement semantics; in languages using this default action (e.g. non-code_comment_block_c_like contexts), backslash sequences like \t, \1, or \g<1> in dictated text are altered or can throw regex errors, whereas the previous implementation inserted the spoken text as-is.

Useful? React with 👍 / 👎.

Comment thread lang/tags/comment_block.py Outdated
Comment thread lang/tags/comment_block.py Outdated
Comment thread lang/tags/comment_block.py Outdated
@FireChickenProductivity FireChickenProductivity marked this pull request as draft April 18, 2026 17:04
@FireChickenProductivity FireChickenProductivity marked this pull request as ready for review May 9, 2026 15:56
@FireChickenProductivity FireChickenProductivity marked this pull request as draft May 11, 2026 00:47
@FireChickenProductivity
Copy link
Copy Markdown
Contributor Author

This now changes the lua snippet for block comments to be consistent with the rest by creating an inline comment. I should probably update breaking changes before merge but want feedback first. I created a separate snippet for multiline block comments so that lua could override the block comment action to use that instead. Is that an acceptable solution to minimize disruption for lua programmers?
I would appreciate suggestions on what the spoken form should be for the multiline block comment snippet.

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.

3 participants