diff --git a/README.md b/README.md index a09f525..f03ef21 100644 --- a/README.md +++ b/README.md @@ -631,6 +631,13 @@ data: [DONE] ## Changelog +### v1.2.4 (2026-05-19) +- **Save button** on every code block — downloads code as a file to your device +- **Copy & Save** buttons on every AI response message +- **File path highlighting** — paths like `/app/build/file.apk` are tappable badges (tap to copy) +- Smart filename detection from code block first line or language +- 30+ language-to-extension mappings for proper file saving + ### v1.2.3 (2026-05-19) - Fixed: Connect button not working — missing `updateSendButton()` function declaration caused JS parse error - All UI event handlers now correctly initialized on app start diff --git a/android/app/build.gradle b/android/app/build.gradle index d6c371f..64ef2f2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "ai.z.chat" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 5 - versionName "1.2.3" + versionCode 6 + versionName "1.2.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' diff --git a/package.json b/package.json index 6acfdbf..dd3e531 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zai-chat", - "version": "1.2.3", + "version": "1.2.4", "description": "Z.AI Chat - Full stack AI chat powered by GLM Coding Plan", "main": "index.js", "scripts": { diff --git a/www/css/styles.css b/www/css/styles.css index 04ee7f3..adcea98 100644 --- a/www/css/styles.css +++ b/www/css/styles.css @@ -418,7 +418,8 @@ a:hover { text-decoration: underline; } border-bottom: none; } .code-header + pre { border-top-left-radius: 0; border-top-right-radius: 0; } -.copy-btn { +.code-header-actions { display: flex; gap: 4px; align-items: center; } +.copy-btn, .download-btn { background: var(--accent-dim); border: none; color: var(--accent); @@ -426,8 +427,51 @@ a:hover { text-decoration: underline; } border-radius: 4px; font-size: 11px; cursor: pointer; + transition: all var(--transition); } -.copy-btn:hover { background: var(--accent); color: white; } +.copy-btn:hover, .download-btn:hover { background: var(--accent); color: white; } + +.msg-actions { + display: flex; + gap: 6px; + margin-top: 8px; + padding-top: 8px; + border-top: 1px solid var(--border); +} +.msg-action-btn { + background: var(--accent-dim); + border: none; + color: var(--accent); + padding: 5px 12px; + border-radius: 6px; + font-size: 12px; + font-weight: 600; + cursor: pointer; + display: flex; + align-items: center; + gap: 4px; + transition: all var(--transition); +} +.msg-action-btn:hover { background: var(--accent); color: white; } +.msg-action-btn.copied { background: var(--success); color: white; } + +.filepath-badge { + display: inline-flex; + align-items: center; + gap: 4px; + background: var(--accent-dim); + border: 1px solid var(--accent); + color: var(--accent); + padding: 2px 8px; + border-radius: 4px; + font-family: 'Fira Code', 'JetBrains Mono', monospace; + font-size: 12px; + cursor: pointer; + transition: all var(--transition); + word-break: break-all; +} +.filepath-badge:hover { background: var(--accent); color: white; } +.filepath-badge::before { content: '📁'; font-size: 11px; } .thinking-indicator { display: flex; diff --git a/www/index.html b/www/index.html index 77296f4..90ef874 100644 --- a/www/index.html +++ b/www/index.html @@ -197,13 +197,24 @@

About

-

Z.AI Chat v1.2.3

+

Z.AI Chat v1.2.4

Built with Z.AI SDK & GLM-5.1

Compatible with Android 15/16

Changelog