fix(llm): hoist ask result fields out of the return table
Table cells shadowed self/column names (model, usage), so [model](self) and [total_tokens](usage) raised "footnote index needs list or map" and blocked live agent.step / qdagent BUILD. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1418742655
commit
fe15603a91
2 files changed
+18
-2
No files matched your search
+10
-1
@@ -289,11 +289,20 @@ Semantic ask → **LLMResult** (`text`, `model`, `finish`, `backend`, `usage`, `
|
||||
2. *
|
||||
**_ = 1**
|
||||
|
||||
Hoist receiver fields before the result table — table cells can shadow `self` /
|
||||
column names (`model`, `usage`), so `[model](self)` / `[total_tokens](usage)`
|
||||
inside the table is unsafe.
|
||||
|
||||
**mdl = [model](self)**
|
||||
**b = [backend](self)**
|
||||
**nm = [name](self)**
|
||||
**tt = [total_tokens](usage)**
|
||||
|
||||
`result` =
|
||||
|
||||
| text | model | finish | backend | usage | name | llm_calls | tokens | tool_calls |
|
||||
|------|-------|--------|---------|-------|------|-----------|--------|------------|
|
||||
| `text` | [model](self) | `finish` | [backend](self) | `usage` | [name](self) | 1 | [total_tokens](usage) | `tc` |
|
||||
| `text` | `mdl` | `finish` | `b` | `usage` | `nm` | 1 | `tt` | `tc` |
|
||||
|
||||
*result*
|
||||
|
||||
|
||||
+8
-1
@@ -240,11 +240,18 @@ import openai:ext/ai/llm/openai.mq.md
|
||||
2. *
|
||||
**_ = 1**
|
||||
|
||||
表单元格会遮蔽 `自` / 列名,先取出字段再组结果表。
|
||||
|
||||
**mdl = [model](自)**
|
||||
**b = [backend](自)**
|
||||
**nm = [name](自)**
|
||||
**tt = [total_tokens](usage)**
|
||||
|
||||
`result` =
|
||||
|
||||
| text | model | finish | backend | usage | name | llm_calls | tokens | tool_calls |
|
||||
|------|-------|--------|---------|-------|------|-----------|--------|------------|
|
||||
| `text` | [model](自) | `finish` | [backend](自) | `usage` | [name](自) | 1 | [total_tokens](usage) | `tc` |
|
||||
| `text` | `mdl` | `finish` | `b` | `usage` | `nm` | 1 | `tt` | `tc` |
|
||||
|
||||
*result*
|
||||
|
||||
|
||||
Reference in new issue
Block a user