feat: /last and bind button for previous Q/A context (v0.3.4)

After attaching a session, show a button and /last command that load the latest human/assistant turn via session.history so phone users can continue with context.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 20:25:07 +08:00
co-authored by Cursor
parent 3566df945b
commit fb5a334edb
16 changed files with 489 additions and 11 deletions
+3
View File
@@ -11,6 +11,8 @@ test('parse slash commands for remote control', () => {
assert.equal(parseCommand('/unbind').type, 'unbind')
assert.equal(parseCommand('/disconnect').type, 'unbind')
assert.equal(parseCommand('/model').type, 'model')
assert.equal(parseCommand('/last').type, 'last')
assert.equal(parseCommand('/context').type, 'last')
assert.equal(parseCommand('/sessions@MyBot').type, 'sessions')
assert.equal(parseCommand('/foo').type, 'unknown')
assert.equal(parseCommand('hello').type, 'plain')
@@ -19,6 +21,7 @@ test('parse slash commands for remote control', () => {
test('Chinese copy mentions sessions and bind', () => {
assert.ok(MSG.DENIED.includes('权限') || MSG.DENIED.includes('授权'))
assert.ok(MSG.HELP.includes('/sessions'))
assert.ok(MSG.HELP.includes('/last'))
assert.ok(MSG.HELP.includes('/model'))
assert.ok(MSG.NEED_BIND.includes('/sessions'))
assert.ok(MSG.WELCOME.includes('Web') || MSG.WELCOME.includes('遥控器'))