Rewrite README.md in Chinese and English with flag tables, command
reference, plugin API, and architecture diagram. Update CLAUDE.md
to reflect the new package layout and build commands.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Consolidate remaining package main files into internal/termapp for
clean separation: cmd/serialterminal/ is the sole entry point.
Update .goreleaser.yaml to build from ./cmd/serialterminal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace complex ptrVal/Val/Flag type machinery with direct pflag
calls. Move flag logic and interactive wizard to internal/flag
package. Eliminate ~200 lines of flag boilerplate.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move serial port, trzsz filter, and pipe lifecycle into
internal/session.SerialSession. Replace 8 global I/O vars
(serialPort, trzszFilter, stdinPipe, stdoutPipe, clientIn,
clientOut, termch, termchOnce) with single sess variable.
Delete utils.go.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move Config struct to internal/config with exported fields. Replace
global var config with package-level cfg pointer. Add OpenLogFile to
config package. Add type alias Config = appconfig.Config in main
package for backward compatibility.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move ForwardManager → pkg/forward/Manager and PluginManager →
pkg/luaplugin/Manager. Move FoeWardMode (now forward.Mode) with
ParseMode/Network/String into pkg/forward. Rename constants:
NOT→None, TCPC→TCP, UDPC→UDP. Update all references in main
package.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
Rename module from COM to github.com/jixishi/SerialTerminalForWindowsTerminal.
Create target directory tree: cmd/serialterminal/, internal/{app,command,config,
console,event,flag,session,tui}, pkg/{charset,forward,luaplugin}.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove unused global var `in`, func `strout`, func `echoConsoleInput`,
func `padRight`, func `ErrorP`, and func `ErrorF`. Inline error check
in CloseSerial. Add COM.exe and coverage.out to .gitignore.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>