Skip to content

executionDelay in CodeFile level & More information to runningCode event #122

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

Merged
merged 9 commits into from
Jul 19, 2025

Conversation

rycont
Copy link
Owner

@rycont rycont commented Jul 19, 2025

  • ExecutionDelay는 이제 Session이 아니라 CodeFile 단위로 관리됩니다.
  • 수식의 연산 단계에서 ExecutionDelay가 적용됩니다. DISABLE_OPERAND_EXECUTION_DELAY 플래그로 비활성화 가능.
  • runningCode 이벤트에 실행한 토큰, 스코프 정보도 함께 전달됩니다.

Copy link

@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.

Summary of Changes

Hello @rycont, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the execution delay mechanism by shifting its control from the session to individual code files and extending its application to formula evaluations. It also enhances the runningCode event with more contextual data, providing greater flexibility and insight into code execution flow. These changes improve the precision of execution visualization and control.

Highlights

  • Execution Delay Scope Change: The executionDelay setting has been moved from the Session level to the CodeFile level. This allows for more granular control, enabling different execution delays for individual code files within a session. The YaksokSession.addModule method now accepts an optional CodeFileConfig to set this delay.
  • Execution Delay in Formulas: Execution delays are now applied during the evaluation of operands within mathematical formulas. A new feature flag, DISABLE_OPERAND_EXECUTION_DELAY, has been introduced to allow disabling this behavior for formula operations, which also prevents runningCode events from being emitted for formula operands when active.
  • Enhanced runningCode Event: The runningCode event, emitted during code execution, now provides richer context. In addition to the start and end positions, it now includes the scope and the specific tokens being executed, offering more detailed information for debugging or visualization purposes.
  • Version Bump: The core package and related modules have been updated to version 2.2.3.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

cloudflare-workers-and-pages bot commented Jul 19, 2025

Deploying dalbit-yaksok with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d33c7d
Status: ✅  Deploy successful!
Preview URL: https://308f6d67.yaksok-ts.pages.dev
Branch Preview URL: https://improved-runningcode.yaksok-ts.pages.dev

View logs

Copy link

@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 refactors executionDelay to the CodeFile level and enhances the runningCode event. The changes are well-implemented. I've left comments to improve maintainability and fix a bug in the documentation's live code runner.

Comment on lines +123 to +124
const disableOperandExecutionDelay =
scope.codeFile?.session?.flags['disable-operand-execution-delay']

Choose a reason for hiding this comment

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

medium

To improve maintainability and avoid using a magic string, use the FEATURE_FLAG enum member here. Import it from ../constant/feature-flags.ts.

Suggested change
const disableOperandExecutionDelay =
scope.codeFile?.session?.flags['disable-operand-execution-delay']
const disableOperandExecutionDelay =
scope.codeFile?.session?.flags[FEATURE_FLAG.DISABLE_OPERAND_EXECUTION_DELAY]

@rycont rycont force-pushed the improved-runningcode branch from d783465 to c445116 Compare July 19, 2025 04:26
@rycont rycont merged commit 9ffc4ca into main Jul 19, 2025
3 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.

1 participant