From a522c07239aa04a372ba01b3771d307a7b5af2aa Mon Sep 17 00:00:00 2001 From: GSteve-Paul Date: Wed, 23 Apr 2025 01:40:00 +0800 Subject: [PATCH 1/2] fix vctrl apply arg bug, random line breaks in args are not allowed for this commit --- visualinux/cmd/vctrl.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/visualinux/cmd/vctrl.py b/visualinux/cmd/vctrl.py index b0a6d0a..055cce6 100644 --- a/visualinux/cmd/vctrl.py +++ b/visualinux/cmd/vctrl.py @@ -53,7 +53,7 @@ def invoke(cls, arg: str): chat_parser.add_argument('message', type=str, nargs='+', help='Message sent to LLM') chat_parser.set_defaults(handle=cls.__invoke_chat) - args = parser.parse_args(re.split(r'\s+', arg)) + args = parser.parse_args(re.split(r'[^\S\r\n]+', arg)) if hasattr(args, 'handle'): args.handle(args) @@ -128,11 +128,12 @@ def __invoke_remove(cls, args): @classmethod def __invoke_apply(cls, args): - print(f'+ vctrl apply id={args.id} vql={args.vql}') + print(f'+ vctrl apply id={args.id} vql={args.viewql}') + vqlCode = " ".join(args.viewql) data = { 'command': 'APPLY', - 'id': args.id, - 'vql': args.vql + 'wKey': args.id, + 'vqlCode': vqlCode } core.send(data) From 0958b0fa1ea479795163857095d0415962788571 Mon Sep 17 00:00:00 2001 From: GSteve-Paul Date: Wed, 23 Apr 2025 10:41:03 +0800 Subject: [PATCH 2/2] fix vctrl remove arg bug --- visualinux/cmd/vctrl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visualinux/cmd/vctrl.py b/visualinux/cmd/vctrl.py index 055cce6..e57cec8 100644 --- a/visualinux/cmd/vctrl.py +++ b/visualinux/cmd/vctrl.py @@ -122,7 +122,7 @@ def __invoke_remove(cls, args): print(f'+ vctrl remove id={args.id}') data = { 'command': 'REMOVE', - 'id': args.id + 'wKey': args.id } core.send(data)