feat: Explore + AI Agent + Map Picker + Chat Persistence (Phase A-D)#181
feat: Explore + AI Agent + Map Picker + Chat Persistence (Phase A-D)#181Shangjin-Xiao wants to merge 69 commits intomainfrom
Conversation
Phase A — 基建层: - Schema v20: poi_name + chat_sessions + chat_messages tables - ChatMessage/ChatSession models with toMap/fromMap/copyWith - Quote.poiName field with three-level display priority - ChatSessionService for chat persistence - PlaceSearchService (Nominatim, free, no API key) - AIRequestHelper.createMessagesWithHistory (token budget) - AIService.streamAskQuestion with history support Phase B — 页面层: - NoteQAChatPage rewrite: persistent sessions, multi-turn context - MapLocationPickerPage: flutter_map + OSM + POI search - Editor long-press location button → map picker - quote_item_widget poiName display priority Phase C — Agent 框架: - AgentTool interface + ToolCall/ToolResult/AgentResponse models - 4 tools: NoteSearch, NoteStats, WebSearch (Bing scraping), NoteEdit - AgentService: tool loop with dedup detection, max rounds, repair retry - AgentChatPage with tool status indicators Phase D — 统一壳层: - ExplorePage: data overview + AI entry + map entry + favorites - Home navigation: third tab → Explore (replaces old AI features) New dependencies: flutter_map, latlong2, flutter_map_marker_cluster, gpt_markdown All external services are FREE with NO API KEY required. Amp-Thread-ID: https://ampcode.com/threads/T-019d3ee5-3f47-756d-a080-9338e46466ff Co-authored-by: Amp <amp@ampcode.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough本PR引入了AI助手、聊天会话管理、地图位置选择器、笔记地图库、Agent工具系统以及相关的数据库迁移,覆盖新增服务、页面、数据模型、本地化字符串和单元测试。 Changes
Sequence Diagram(s)sequenceDiagram
actor User as 用户
participant Explorer as ExplorePage
participant AIAssistant as AIAssistantPage
participant Agent as AgentService
participant Tools as AgentTools
participant LLM as OpenAI API
User->>Explorer: 点击"AI助手"
Explorer->>AIAssistant: 导航(note=null)
AIAssistant->>AIAssistant: 初始化Agent模式
User->>AIAssistant: 输入问题
AIAssistant->>Agent: runAgent(userMessage, history)
Agent->>LLM: 请求completion(messages, tools)
LLM-->>Agent: assistant + toolCalls
Agent->>Tools: 执行工具调用
Tools->>Tools: 笔记搜索/统计/网络搜索
Tools-->>Agent: ToolResult
Agent->>LLM: 追加结果继续推理
LLM-->>Agent: final content
Agent-->>AIAssistant: AgentResponse
AIAssistant->>AIAssistant: 渲染AI回复
AIAssistant-->>User: 显示结果
sequenceDiagram
actor User as 用户
participant NoteEditor as 笔记编辑器
participant MapPicker as MapLocationPickerPage
participant Location as LocationService
participant Geocoding as LocalGeocodingService
participant Map as FlutterMap
User->>NoteEditor: 长按位置芯片
NoteEditor->>MapPicker: 导航(initialLat?, initialLon?)
MapPicker->>Location: getCurrentLocation()
Location-->>MapPicker: Position
MapPicker->>Map: 更新中心点
User->>MapPicker: 点击地图选择位置
MapPicker->>Geocoding: getAddressFromCoordinates(lat, lon)
Geocoding-->>MapPicker: AddressModel(street, district, city...)
MapPicker->>MapPicker: 提取POI名称
MapPicker-->>NoteEditor: MapPickerResult(lat, lon, location, poiName)
NoteEditor->>NoteEditor: 更新_poiName、_latitude、_longitude
NoteEditor->>NoteEditor: 刷新位置显示文本
sequenceDiagram
participant MapMemory as MapMemoryPage
participant Database as DatabaseService
participant FlutterMap as FlutterMap
participant Cluster as MarkerCluster
participant BottomSheet as 底部表单
participant Editor as NoteFullEditorPage
MapMemory->>Database: 查询所有含坐标笔记
Database-->>MapMemory: List[Quote]
MapMemory->>MapMemory: 计算地图中心
MapMemory->>FlutterMap: 初始化地图视图
MapMemory->>Cluster: 添加聚类标记层
User->>Cluster: 点击标记
Cluster->>BottomSheet: 显示笔记详情
User->>BottomSheet: 点击"AI问答"
BottomSheet->>Editor: 导航AIAssistantPage(quote)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes 该PR涉及广泛的功能整合,包括:新的Agent服务与多工具系统(涉及复杂的循环控制、状态管理、错误处理);数据库架构重设(v19→v20迁移、新表添加、外键设置);多个数据模型的序列化/反序列化逻辑修改;聊天会话的完整生命周期管理;地图组件集成;跨页面导航重构;大量本地化字符串同步。异质性高,涉及数据层、服务层、UI层和测试层的多个不同关注点。 Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
|
…very Root cause: ChatSessionService methods could run before main.dart injects database, causing early chat operations to return/drop persistence. Solution: gate all DB operations via a one-shot readiness completer with timeout-backed wait; add startup-race regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pup when upgrading to agent mode
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/plans/2026-04-04-unified-ai-and-map-memory-design.md (1)
3-3: 建议修正文案语法,避免“记录了关于”表达不顺。Line 3 的“本文档记录了关于 ...”建议改为“本文档记录 ...”或“本文档围绕 ...”。这是用户可见文案质量问题。
✏️ 建议修改
-> 本文档记录了关于 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计。 +> 本文档记录 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent 模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/plans/2026-04-04-unified-ai-and-map-memory-design.md` at line 3, The sentence "本文档记录了关于 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计。" uses the awkward phrase "记录了关于"; replace it with a smoother phrasing such as "本文档记录 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent 模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计。" or "本文档围绕 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent 模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计展开。" Update the exact sentence to one of these alternatives (ensure consistent spacing around "vs" and "模式") wherever the original sentence appears.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-design.md`:
- Around line 49-50: The design text currently states "程序发送所有笔记" which risks
privacy and cost; change the design to default to a retrieval-based pipeline
instead of sending all notes by specifying "跨笔记检索" uses top-k retrieval with
snippet/summary extraction (e.g., top-k 摘要/片段) and explicitly document a
sensitive-field redaction/PII masking step before any content is sent to the
LLM, as well as an opt-in full-upload flow; update the sections labeled "跨笔记检索"
and "网络访问" to reflect these changes and mention configurable k and a
redact-sensitive-fields function/policy for minimization.
- Line 70:
在“初始视角与空状态”块(即描述“进入后默认呈现全局总览视角...定位到当前位置附近”的地图空状态)补充定位权限被拒绝或系统定位关闭时的兜底策略:明确说明应切换到默认城市视角或全局世界视角作为
fallback,并在地图顶部增加一个显眼的权限引导气泡/按钮(示例文案:提示需打开定位权限并提供“重新尝试定位”与“使用默认视角”两种操作),同时说明交互流程与文案优先级以避免白屏或页面失败感知。
- Around line 57-60: Update the design text for "升级为 Agent 模式" / "保留上下文 (不中断对话)"
to include an explicit privacy safeguard: require a second confirmation prompt
before the first external-tool/network call that clearly states "将发送上下文范围" with
a visible summary of which notes/chats will be shared, add an option in the
initial upgrade flow to "一键清除上下文再升级" so users can remove bound notes before
enabling Agent 模式, and document that the first external-tool activation must
show the scope and require explicit consent (and record the user's choice).
---
Nitpick comments:
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-design.md`:
- Line 3: The sentence "本文档记录了关于 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent模式)、AI
Skills 技能系统以及地图回忆的最终产品交互设计。" uses the awkward phrase "记录了关于"; replace it with a
smoother phrasing such as "本文档记录 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent 模式)、AI
Skills 技能系统以及地图回忆的最终产品交互设计。" or "本文档围绕 Explore 中枢页、统一 AI 容器(单笔记模式 vs Agent
模式)、AI Skills 技能系统以及地图回忆的最终产品交互设计展开。" Update the exact sentence to one of these
alternatives (ensure consistent spacing around "vs" and "模式") wherever the
original sentence appears.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: be7d0edc-a714-4271-bfec-d954c9f28837
📒 Files selected for processing (2)
docs/plans/2026-04-04-unified-ai-and-map-memory-design.mddocs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md
✅ Files skipped from review due to trivial changes (1)
- docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md
| - **跨笔记检索**:基于用户描述搜索过往笔记(含周期洞察:程序发送所有笔记,或 Agent 自主搜索重新查看某条)。 | ||
| - **网络访问**:联网搜索、直接读取网页内容。 |
There was a problem hiding this comment.
全量笔记直传给 LLM 的策略缺少数据最小化约束。
Line 49-50 写到“程序发送所有笔记”,这会显著放大隐私与成本风险。建议在设计上明确默认走检索召回(top-k 摘要/片段)而不是全量直传,并加入敏感字段脱敏策略。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-design.md` around lines 49 -
50, The design text currently states "程序发送所有笔记" which risks privacy and cost;
change the design to default to a retrieval-based pipeline instead of sending
all notes by specifying "跨笔记检索" uses top-k retrieval with snippet/summary
extraction (e.g., top-k 摘要/片段) and explicitly document a sensitive-field
redaction/PII masking step before any content is sent to the LLM, as well as an
opt-in full-upload flow; update the sections labeled "跨笔记检索" and "网络访问" to
reflect these changes and mention configurable k and a redact-sensitive-fields
function/policy for minimization.
| - **升级为 Agent 模式**:在“单笔记模式”下,可一键开启“Agent 模式”开关。 | ||
| - **弹窗确认**:首次开启时弹出安全确认框:“开启 Agent 模式后,AI 将具备调用外部工具(如联网、全库搜索)的能力”,并提供“不再提醒”勾选项。 | ||
| - **保留上下文 (不中断对话)**:切换为 Agent 模式后,**当前绑定的笔记不会被解除**,依然作为强大的上下文存在。不仅不会重新开启对话,之前的聊天记录也完全保留。 | ||
| - **降级为单笔记模式**:若在无笔记绑定的 Agent 模式下想切回单笔记模式,系统会提示“请先从记录页选择一条具体笔记进入”。 |
There was a problem hiding this comment.
模式升级后保留完整上下文存在权限边界穿透风险。
Line 57-60 规定从单笔记模式升级到 Agent 模式后保留完整历史;若随后触发联网/外部工具,历史中原本“沙盒”内容会被带出。建议补充:首次外部工具调用前二次确认 + 可见的“将发送上下文范围”提示 + 一键清除上下文再升级。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-design.md` around lines 57 -
60, Update the design text for "升级为 Agent 模式" / "保留上下文 (不中断对话)" to include an
explicit privacy safeguard: require a second confirmation prompt before the
first external-tool/network call that clearly states "将发送上下文范围" with a visible
summary of which notes/chats will be shared, add an option in the initial
upgrade flow to "一键清除上下文再升级" so users can remove bound notes before enabling
Agent 模式, and document that the first external-tool activation must show the
scope and require explicit consent (and record the user's choice).
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md (1)
112-112: 可选:考虑更强的形容词。静态分析工具建议 "deep logic review" 中的 "deep" 可以用更具体的词替换,例如 "thorough"(彻底的)或 "comprehensive"(全面的)来加强表达。不过当前用词在上下文中也完全可接受。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md` at line 112, Replace the vague adjective "deep" in the sentence "Dispatch to Copilot (`GPT-5.3-codex exhigh`) for a deep logic review of the Agent Loop and UI components." with a stronger, more specific term such as "thorough" or "comprehensive" (e.g., "...for a thorough logic review..." or "...for a comprehensive logic review...") to improve clarity and emphasis.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md`:
- Around line 37-38: The plan's "Dispatcher Action" that uses run_shell_command
to auto-clone external repos (e.g., opencode) is unsafe; change it to require
manual cloning or add pre-clone safety controls: remove or disable any automated
run_shell_command calls, and instead document that contributors must manually
clone trusted sources and inspect code before use; if automation is required for
reproducibility, implement explicit safeguards in the dispatcher (validate
repository URL, restrict to an allowlist, verify commit hashes/signatures,
perform static analysis/SCA scanning, and run the clone inside a sandboxed
environment) and surface a human confirmation step before executing Agent Loop
exploration in Phase 1 Dart implementation.
- Around line 3-10: The doc currently mandates agents run in "YOLO mode" and "do
NOT stop to ask the user for permission", which poses safety and governance
risks; update the "SPECIAL INSTRUCTION FOR THE EXECUTING AGENT" section to
require explicit human confirmation checkpoints for high-risk actions (e.g.,
"submit code", "clone external repos", "delete files", "modify critical
branches") while retaining automated dispatching for low-risk tasks;
specifically, add a clear gating rule and checklist that the Dispatcher (调度员)
must follow (e.g., confirmation prompt, approver identity, and audit log) and
annotate the "YOLO mode" and "Dispatcher" directives to state they are suspended
when a checkpoint is triggered so the agent will pause and request human
approval before proceeding.
- Around line 66-70: 更新计划文档中的实现摘要以反映当前实际结果:替换第 1 点(创建 AIAssistantPage
并移除旧页面)为说明当前保留并分别增强了 NoteQAChatPage 和 AgentChatPage 的事实,并在文末加入明确的后续工作项(例如“后续
PR:将 NoteQAChatPage 与 AgentChatPage 合并为 AIAssistantPage 的重构任务”),同时在文档中引用
AIAssistantPage、NoteQAChatPage 和 AgentChatPage
以便读者知道哪些组件已保留、哪些为新增或增强,并注明对应的阶段(Phase B/Phase C)。
---
Nitpick comments:
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md`:
- Line 112: Replace the vague adjective "deep" in the sentence "Dispatch to
Copilot (`GPT-5.3-codex exhigh`) for a deep logic review of the Agent Loop and
UI components." with a stronger, more specific term such as "thorough" or
"comprehensive" (e.g., "...for a thorough logic review..." or "...for a
comprehensive logic review...") to improve clarity and emphasis.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 11cb9bab-5ae7-44f7-8f27-a41718bc1a2d
📒 Files selected for processing (1)
docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md
| **Dispatcher Action:** Use `run_shell_command` to clone repositories like `opencode` or browse local Gemini CLI source code to study how they implement the `Agent Loop` (while/for loops for tool execution). | ||
| - Note: Apply the learned best practices to the Dart implementation in Phase 1. |
There was a problem hiding this comment.
克隆外部仓库存在安全隐患。
指示使用 run_shell_command 自动克隆外部仓库(如 opencode)可能带来安全风险:
- 未知仓库内容可能包含恶意代码
- 自动执行可能触发供应链攻击
建议改为手动审查并克隆可信源,或至少在克隆前添加安全检查步骤。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md` around
lines 37 - 38, The plan's "Dispatcher Action" that uses run_shell_command to
auto-clone external repos (e.g., opencode) is unsafe; change it to require
manual cloning or add pre-clone safety controls: remove or disable any automated
run_shell_command calls, and instead document that contributors must manually
clone trusted sources and inspect code before use; if automation is required for
reproducibility, implement explicit safeguards in the dispatcher (validate
repository URL, restrict to an allowlist, verify commit hashes/signatures,
perform static analysis/SCA scanning, and run the clone inside a sandboxed
environment) and surface a human confirmation step before executing Agent Loop
exploration in Phase 1 Dart implementation.
| 1. Create `lib/pages/ai_assistant_page.dart` to replace both `agent_chat_page.dart` and `note_qa_chat_page.dart`. | ||
| 2. Implement the floating context chip when entering from a specific note. | ||
| 3. Implement the dynamic greeting when entering from the Explore page. | ||
| 4. Add the "New Chat" button in the AppBar. | ||
| 5. Commit the code and remove old pages. |
There was a problem hiding this comment.
计划与实际实现不一致。
此任务指示创建统一的 AIAssistantPage 来替换 agent_chat_page.dart 和 note_qa_chat_page.dart,并移除旧页面。但根据 PR 摘要:
- Phase B 重写了
NoteQAChatPage(保留并增强) - Phase C 添加了
AgentChatPage(新增功能)
两个页面均被保留并更新,而非按计划统一为单一页面。建议更新此文档以反映实际的实现路径,或在后续 PR 中完成统一重构。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/plans/2026-04-04-unified-ai-and-map-memory-implementation.md` around
lines 66 - 70, 更新计划文档中的实现摘要以反映当前实际结果:替换第 1 点(创建 AIAssistantPage
并移除旧页面)为说明当前保留并分别增强了 NoteQAChatPage 和 AgentChatPage 的事实,并在文末加入明确的后续工作项(例如“后续
PR:将 NoteQAChatPage 与 AgentChatPage 合并为 AIAssistantPage 的重构任务”),同时在文档中引用
AIAssistantPage、NoteQAChatPage 和 AgentChatPage
以便读者知道哪些组件已保留、哪些为新增或增强,并注明对应的阶段(Phase B/Phase C)。
…ctions, and review processes
d633797 to
6c124b9
Compare
- 此时此刻(sameTimeOfDay)改为兜底推送:仅在当日无推送且7天内无其他用户笔记时触发 - 每日一言(dailyQuote)每天最多推送1条,优先级低于用户笔记但高于此时此刻 - 新增 _todayPushedDateKey 和 _todayDailyQuotePushedKey 追踪今日推送状态 - 调整优先级:那年今日(100) > 同地点(25-75) > 往月今日(70) > 上周今日(55) > 同天气(40) > 每日一言(30) > 此时此刻(20) - 更新疲劳成本配置:此时此刻成本上调至3.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…and explain app context limit
| groupKey = '📅 Today'; | ||
| } else if (dayDiff == 1) { | ||
| groupKey = '📅 Yesterday'; | ||
| } else if (dayDiff < 7) { | ||
| groupKey = '📅 This Week'; | ||
| } else { | ||
| groupKey = '📅 Earlier'; |
There was a problem hiding this comment.
🔴 Hardcoded English group labels in SessionHistorySheet violate i18n rule
The session history grouping uses hardcoded English strings '📅 Today', '📅 Yesterday', '📅 This Week', '📅 Earlier' (lines 98-104, 175) as both internal keys and displayed text. These are rendered directly in the UI as group headers (line 197), violating the mandatory AGENTS.md rule against hardcoded user-visible text.
Prompt for agents
In session_history_sheet.dart, the date group keys ('📅 Today', '📅 Yesterday', etc.) at lines 98-104 are used both as map keys and as displayed text in the UI (line 197). Split these: use locale-independent internal keys (e.g. 'today', 'yesterday', 'this_week', 'earlier') for the map, and use AppLocalizations for the displayed group header text. Add the corresponding l10n keys to app_zh.arb and app_en.arb.
Was this helpful? React with 👍 or 👎 to provide feedback.
| Padding( | ||
| padding: const EdgeInsets.all(12), | ||
| child: Text( | ||
| '可用命令', |
There was a problem hiding this comment.
🔴 Hardcoded Chinese text '可用命令' in SlashCommandsMenu violates i18n rule
The slash commands menu at slash_commands_menu.dart:118 uses the hardcoded Chinese string '可用命令' as a UI label, and line 363 uses '输入 / 查看命令' as a hint text. Both violate the mandatory AGENTS.md rule: "禁止 UI 层硬编码任何用户可见文本(含中文)".
Prompt for agents
In slash_commands_menu.dart, line 118 hardcodes '可用命令' and line 363 hardcodes '输入 / 查看命令'. Both are user-visible text that must be internationalized. Add corresponding l10n keys to app_zh.arb and app_en.arb, run flutter gen-l10n, and pass AppLocalizations into SlashCommandsMenu (either via context or constructor parameter) to use the localized strings.
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
问题:其他 AI 代理破坏了以下功能: 1. 工具调用从内联消息退化为输入框内面板 2. 输入框使用 AnimatedContainer+keyboardHeight 导致跳动 3. 流式传输被 150ms 防抖破坏 4. 添加大量不需要的代码(~600行) 修复: - 恢复到 b6f268b 基线版本的 ai_assistant_page.dart - 保持 AgentService 持久 broadcast StreamController 改进 - 工具调用内联显示: tool_progress 消息插入 _messages 列表 - 输入框: SafeArea 包裹,不手动处理键盘高度 - 流式传输: 直接 setState 无防抖 - 更新 .squad/decisions.md 记录正确架构决策,防止后续破坏 Amp-Thread-ID: https://ampcode.com/threads/T-019d7bc0-d519-716d-b431-885a95d6c35b Co-authored-by: Amp <amp@ampcode.com>
1. 输入框一体化:TextField + 按钮行融为一体,无分割线 - 文本框无边框(InputBorder.none),按钮行在底部 - 整体圆角24,紧凑padding 2. 模式切换:PopupMenuButton → 直接点击切换 - Agent/Chat 直接 tap toggle,不弹菜单 - 使用英文 'Agent'/'Chat',简洁 3. 工具调用面板:默认折叠,用户展开后不自动折叠 - initState: _isExpanded = false - didUpdateWidget: 不再自动展开/折叠 - 移除 _userManuallyToggled(简化逻辑) Amp-Thread-ID: https://ampcode.com/threads/T-019d7bc0-d519-716d-b431-885a95d6c35b Co-authored-by: Amp <amp@ampcode.com>
… result card with editor support
…rectly' with full functional loop
| final buffer = StringBuffer(); | ||
| try { | ||
| await for (final chunk in aiService.streamGeneralConversation( | ||
| '请基于已有概览数据生成一段简短总结,突出记录特点与建议,100字以内。', |
There was a problem hiding this comment.
🟡 Hardcoded Chinese string in explore_page.dart violates i18n rules
In explore_page.dart:139, the string '请基于已有概览数据生成一段简短总结,突出记录特点与建议,100字以内。' is a user-facing prompt passed to the AI service. While it's a system prompt rather than UI text, it's hardcoded Chinese which violates the AGENTS.md i18n rules. The same file also has 'AI Chat' hardcoded at ai_assistant_page_session.dart:113 in _createNewSession.
Was this helpful? React with 👍 or 👎 to provide feedback.
…explore page and global mode
… packages for SOTA robustness
… 100% reliable card generation
…stions with ProposeEditTool
…t buttons, tool progress hanging, and ddgs search formatting
概述
完成 4 份计划文档的 SOTA 级重构,涵盖 Phase A(基建层)到 Phase D(统一壳层)。
Phase A — 基建层
poi_name+chat_sessions+chat_messages表Phase B — 页面层
Phase C — Agent 框架
Phase D — 统一壳层
技术决策
_removeTagIdsColumnSafely已同步 poi_name 防数据丢失验证
flutter analyze --no-fatal-infos: 0 error, 0 warningdart format: 全部通过Summary by CodeRabbit
发布说明
新功能
改进
本地化