Skip to content

Releases: bestK/taskpin

v1.6.8

Choose a tag to compare

@github-actions github-actions released this 31 Jul 02:04

Full Changelog: v0.0.1...v1.6.8

v1.6.5

Choose a tag to compare

@bestK bestK released this 18 Jun 08:52

修复

  • 参数值长度限制从 256 扩展到 2048 — 修复 Bearer token 等长参数被截断的问题,UTF-8 转换缓冲区同步放大
  • 新项目 Dialog 居中 — 修复新增 item 时 dlg_x/dlg_y 初始化为 0 导致对话框出现在左上角的问题

新增示例

  • asxs_billing_state.lua — ASXS 计费状态 + 服务可用性,合并展示套餐用量/余额和服务健康度

v1.6.4

Choose a tag to compare

@github-actions github-actions released this 17 Jun 06:52

Changelog

New Features

  • JSONPath-style $.path template support: field_expr now supports mixing Lua functions with $.path JSON path references. Before Lua execution, the system safely substitutes each $.path expression based on its runtime type: numbers and booleans are inlined as literals, strings are automatically quoted and escaped, and missing paths resolve to nil.

    Example:

  return "Balance: " .. string.format("%.2f", $.data.wallets[0].balance)

If $.data.wallets[0].balance resolves to the number 100.5, the substituted code becomes:

  return "Balance: " .. string.format("%.2f", 100.5)

Bug Fixes

  • Fix field_expr path extraction: non-path characters (), :, etc.) now correctly terminate $.path references
  • Fix Lua 5.4 return value handling: function calls used as statements no longer discard return values in script_exec wrapper

Full Changelog: v1.6.3...v1.6.4

v1.6.3

Choose a tag to compare

@github-actions github-actions released this 12 Jun 06:39

v1.6.3

Bug Fixes

  • 修复 Dialog Shift+拖拽后窗口回跳到初始位置的问题
  • 修复多个 Dialog 同时打开时 Shift 操作导致闪烁的问题
  • 修复 Dialog 刷新时位置被重置的问题

Improvements

  • Dialog 拖拽改为增量模式(delta-based),不再依赖 window.screenX 缓存
  • 每个 Dialog 独立管理 webview 拖拽覆盖层状态,互不干扰
  • 无 webview 的 borderless Dialog(如 hud_clock)支持 Shift+拖拽 + 提示覆盖层
  • clickthrough Dialog 按住 Shift 时可拖动(临时取消穿透)
  • Shift+hover 时鼠标指针统一为手型
  • 新增 sys.get_self_conf() / sys.set_self_conf() API,脚本可读写自身配置项
  • 消除 Dialog 内容刷新时的闪烁

Documentation

  • 更新 LUA_API.md / LUA_API_EN.md:新增 dialog 控制函数、animation 模块、sys.set_bar_text/lua 文档

Full Changelog: v1.6.2...v1.6.3

v1.6.1

Choose a tag to compare

@bestK bestK released this 11 Jun 07:04

New Features

  • sys.set_bar_text() / sys.set_bar_lua(): WebView can now update bar display with plain text or rich Lua expressions
  • WebView lua_path binding: Each WebView knows its owner script, bridge callbacks target the correct bar
  • Dialog size persistence: All dialogs save position AND size on close, restore on next open
  • K-Line Demo: kline_demo.lua — BTC/USDT candlestick chart via WebView2 + lightweight-charts, real-time WebSocket updates

Improvements

  • WebView creation deferred via PostMessage to prevent stack overflow from recursive WM_PAINT
  • webview_creating guard prevents duplicate creation attempts
  • Stack size increased to 8MB as safety margin for WebView2 initialization
  • set_bar_lua uses direct return expr instead of function wrapper (fixes syntax error with .. operator)
  • __bar_lua global persists last bar expression across script re-execution
  • Dialog position/size saved for all dialogs (removed borderless-only restriction)

Bug Fixes

  • Fix WebView2 stack overflow crash (0xC00000FD) when opening webview dialogs
  • Fix set_bar_lua incorrectly wrapping expressions in function()...end()
  • Fix webview bridge callbacks affecting wrong bar (global lua_path race condition)

Full Changelog: v1.6.0...v1.6.1

v1.6.0

Choose a tag to compare

@bestK bestK released this 10 Jun 08:50

New Features

  • Dialog Control API: open_dialog() / close_dialog() / dialog_is_open() — Lua scripts can now programmatically control dialog windows
  • Animation Module (animation.*): built-in animation effects for dialog elements
    • blink, fade_in, fade_out, scale, pulse, fly, color, ping_pong, loop, progress
    • Easing functions: ease_in, ease_out, ease_in_out, bounce, lerp
  • Dialog Render Callback: dialog({render = function() ... end}) — content only computed when dialog is open, zero overhead during bar refresh
  • Animation Demo: examples/animation_demo.lua showcasing all effects

Improvements

  • __dialog_open global auto-injected before script execution
  • dialog() strips content when dialog is not open (skip C-side parsing)
  • script_exec_file_try() non-blocking variant prevents dialog refresh from freezing UI
  • DIALOG_MAX_ITEMS increased from 8 to 16
  • Script errors now logged via logger_write (previously silent)
  • [script error] on bar now logs the script path for debugging
  • system_monitor.lua refactored to use render mode

Bug Fixes

  • Fix stack overflow crash when clicking jsonpath in edit dialog (ScriptResult 7.4MB on stack → heap)
  • Fix dialog path matching (show_script_dialog now resolves to absolute path)
  • Fix script_exec_file returning FALSE for scripts with empty display but valid dialog

Full Changelog: v1.5.5...v1.6.0

v1.5.5

Choose a tag to compare

@bestK bestK released this 09 Jun 02:48

What's New

全局热键 + 选中内容获取

  • @hotkey Ctrl+Shift+T 声明注册系统级热键
  • 热键触发时自动获取当前选中内容(文本/文件/图片)
  • 通过 selection 全局变量注入脚本,支持划词翻译、批量处理等场景
  • 热键冲突时 bar 提示,支持通过 HOTKEY 参数用户自定义

管理员权限支持

  • @admin <描述> 声明脚本需要管理员权限
  • 启动时弹窗提示提权,显示脚本描述
  • 取消后 bar 显示权限提示,点击可重新发起
  • sys.is_admin() / sys.elevate() 运行时 API

精确进程网速统计

  • sys.net_processes() 管理员模式下使用 TCP Extended Stats
  • 读取每条连接的 DataBytesIn/Out,精确到纯网络流量
  • 非管理员自动回退到 IO Counters(兼容旧行为)

Bar Tooltip

  • 鼠标悬停 bar 显示 tooltip,默认为脚本名
  • 第 4 个返回值自定义 tooltip 文本,支持动态更新

其他

  • Bar 首次加载显示 "loading..." 状态
  • MODE=dev/release 构建模式,开发时不下载覆盖 lang 文件
  • CI 使用 MODE=release 构建

完整文档: LUA_API.md

Full Changelog: v1.5.4...v1.5.5

v1.5.4

Choose a tag to compare

@bestK bestK released this 08 Jun 04:01

What's New

WebSocket 支持

  • 新增 websocket.connect(url, options) Lua API
  • 独立接收线程 + 非阻塞消息队列,配合 @realtime 实现低延迟推送
  • 支持 ws://wss:// 协议
  • 默认自动重连(指数退避 1s~30s),可关闭
  • 连接生命周期绑定 bar,移除时自动关闭

Dialog 布局增强

  • table 支持 col_widths 自定义列宽(固定 + 自动填充)
  • table 支持 height 自定义行高
  • table 支持 wrap 单元格文本自动换行
  • button 支持 width/height/align 布局控制

其他改进

  • Bar 首次加载时显示 "loading..." 状态
  • http 响应体大小上限从 256KB 提升到 2MB
  • GitHub Trending 示例插件

Lua API 示例

-- WebSocket
local ws = websocket.connect("wss://example.com/stream", {
    reconnect = true,
    headers = "Authorization: Bearer xxx"
})
ws:send("hello")
local msg = ws:recv()  -- non-blocking
ws:close()

-- Table with custom layout
{ type = "table",
  columns = { "Name", "Status", "Detail" },
  col_widths = { 80, 60, 0 },
  height = 24, wrap = true,
  rows = { ... } }

-- Button with size and alignment
{ type = "button", value = "Submit",
  width = 200, height = 36, align = "center",
  color = "#FFF", bg_color = "#336699" }

完整文档: LUA_API.md

Full Changelog: v1.5.3...v1.5.4

v1.5.3

Choose a tag to compare

@github-actions github-actions released this 05 Jun 03:18

Full Changelog: v1.5.2...v1.5.3

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 04 Jun 10:16

What's New in v1.5.2

WebView2 Improvements

  • Remote HTML URLs auto-cached locally (5min TTL, %APPDATA%/TaskPin/webview_cache/)
  • Fix: text/plain response from GitHub raw handled correctly
  • Fix: JS bridge (window.taskpin) available on page load
  • System resources display in demo (CPU, Memory, Network via JS bridge)
  • China users: auto gh-proxy for remote HTML URLs

JS ↔ Lua Bridge

let cpu = await taskpin.sys.cpu();
let mem = await taskpin.sys.memory();
let net = await taskpin.sys.net_speed();
await taskpin.sys.notify("Title", "Content");

Auto-Download WebView2Loader.dll

  • Detect system architecture (x64/x86)
  • Try multiple sources with gh-proxy fallback
  • i18n error messages with manual download URL on failure