fix: selector rows clickable via inner text (cycleConv); new session opens workspace picker (reserve new-workspace)

This commit is contained in:
2026-09-01 23:15:38 +08:00
parent c7e584e657
commit c98bd6c919
+15 -5
View File
@@ -10,9 +10,9 @@
<text class="page-title small">工作区</text> <text class="page-title small">工作区</text>
<div class="ws-group" for="{{workTree}}"> <div class="ws-group" for="{{workTree}}">
<text class="ws-name">📁 {{$item.name}}</text> <text class="ws-name">📁 {{$item.name}}</text>
<div class="sel-conv {{$item.title === currentConv ? 'sel-active' : ''}}" for="{{$item.convs}}" onclick="cycleConv"> <div class="sel-conv {{$item.title === currentConv ? 'sel-active' : ''}}" for="{{$item.convs}}">
<text class="sel-title fl{{fontLevel}}">{{$item.title}}</text> <text class="sel-title fl{{fontLevel}}" onclick="cycleConv">{{$item.title}}</text>
<text class="sel-time">{{$item.time}}</text> <text class="sel-time" onclick="cycleConv">{{$item.time}}</text>
</div> </div>
</div> </div>
</div> </div>
@@ -354,8 +354,12 @@ export default {
}, },
newSession() { newSession() {
this.currentConv = '新会话' // 弹出选择工作区小窗(预留:后续可从电脑目录/插件串流新建工作区)
this.currentIndex = 1 this.pickerTitle = '选择工作区'
this.pickerTarget = 'ws'
this.pickerOptions = this.workTree.map((w) => w.name)
this.pickerIndex = 0
this.showOptionPicker = true
}, },
cycleConv() { cycleConv() {
@@ -457,6 +461,12 @@ export default {
applyPicker() { applyPicker() {
const t = this.pickerTarget const t = this.pickerTarget
if (!t) return this.showOptionPicker = false if (!t) return this.showOptionPicker = false
if (t === 'ws') {
// 预留:新建工作区(后续让插件串流电脑目录,这里先占位)
this.currentConv = '新会话'
this.showOptionPicker = false
return
}
const values = { model:'modelValue', provider:'providerValue', reason:'reasonValue', perm:'permValue', dialog:'dialogModeValue', conn:'watchConnValue', server:'serverValue' } const values = { model:'modelValue', provider:'providerValue', reason:'reasonValue', perm:'permValue', dialog:'dialogModeValue', conn:'watchConnValue', server:'serverValue' }
this[t + 'Idx'] = this.pickerIndex this[t + 'Idx'] = this.pickerIndex
this[values[t]] = this.pickerOptions[this.pickerIndex] this[values[t]] = this.pickerOptions[this.pickerIndex]