refactor: extract pkg/charset and internal/event packages

Extract ConvertChunk/FormatHexFrame into pkg/charset (zero external deps).
Extract UIEvent/UIEventKind/UIPanelKind types into internal/event.
Update all references across main package to use qualified imports.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
JiXieShi
2026-05-22 02:35:30 +08:00
parent d434d961ee
commit e0de872740
26 changed files with 4504 additions and 230 deletions
+14
View File
@@ -0,0 +1,14 @@
//go:build windows
package main
import (
"golang.org/x/sys/windows"
)
func enableVTInput(fd int) {
var mode uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &mode); err == nil {
_ = windows.SetConsoleMode(windows.Handle(fd), mode|windows.ENABLE_VIRTUAL_TERMINAL_INPUT)
}
}