Repository navigation
fix(tui): extension 컴포넌트의 render/invalidate 예외가 TUI를 죽이지 않게 격리 - #355
Merged
Merged
Conversation
- guardExtensionRender: 같은 객체를 유지한 채 render/invalidate 예외를 잡고, 실패한 인스턴스는 다시 부르지 않고 `Extension render failed`와 fallback을 그린다. - 적용: tool renderCall/renderResult, custom message, widget, footer, header, custom editor (기본 에디터로 복구), custom UI(고정 오류로 reject해 tool이 pending으로 남지 않음). - extensions 문서(Fallback), CHANGELOG 갱신.
Owner
Author
|
OMK Community Thanks for opening this pull request. Mention Automated response. No code changes or merges are performed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
extension이 돌려준 컴포넌트의
render()나invalidate()가 나중에 예외를 던져도, 그 예외가 TUI를 죽이지 않게 격리합니다. 지금 main에서는setFooter로 등록한 footer가 render에서 예외를 던지면 OMK 프로세스가 종료 코드 1로 끝나고, 예외 메시지가 stderr에 그대로 찍힙니다.guardExtensionRender(component, fallback?)dispose,lastComponent같은 객체 식별이 유지됩니다.Extension render failed안내와 fallback만 그립니다. 같은 인스턴스는 다시 호출하지 않습니다.renderCall,renderResult): raw 결과 텍스트와 실행 상태를 유지합니다.showExtensionCustom): 창을 닫고 고정 오류로 reject합니다. 그래서 그 UI를 기다리던 tool이 pending으로 남지 않습니다.handleInput()예외, extension 코드 sandbox, verification 결과 변경docs/extensions.md(Fallback),CHANGELOG.md(Fixed)원래 체크아웃의 미커밋 작업에서 이 부분만 골라 main 기준으로 옮겼습니다.
검증 (로컬, 커밋 88fa372)
extension-render-errors.test.ts(원래 작업의 테스트, 21개)close(result, error)로 reject 경로를 추가하고 21개 모두 통과했습니다.private-secret)가 화면 출력에 나오지 않는지도 검사합니다.npx vitest --run:ToolExecutionComponent,CustomMessageComponent,InteractiveMode,guardExtensionRender를 쓰는 파일과 extension*, tool-execution*, custom-message*, interactive* 33개 파일. 346개 통과, 1개 skipnpx tsgo --noEmit,npx biome check --error-on-warnings .,check:module-size,check:import-cycles,check:doc-links,check:feature-claims,check:release-surface-e)Extension render failed가 표시되고 입력 대기 상태가 유지됩니다. 예외 메시지는 화면에 나오지 않습니다.EXITED=1로 종료되고, 예외 메시지가 stderr에 남습니다.