• Will Chen's avatar
    Replace ChatLogsData with comprehensive SessionDebugBundle schema (#2488) · beeaef57
    Will Chen 提交于
    ## Summary
    - Replaces the old `ChatLogsDataSchema` with a new
    `SessionDebugBundleSchema` (schema version 1) that captures all
    non-sensitive data needed for debugging chat sessions
    - Each message now includes AI SDK JSON (with base64 images stripped),
    model name, token usage, timestamps, commit hashes, request ID, and
    approval state
    - Adds non-sensitive user settings snapshot, app metadata, custom
    provider/model definitions, and MCP server configurations to the debug
    bundle
    - Updates HelpDialog to use the new schema and adds `Session Schema:
    v2.0` marker to GitHub issue templates
    
    ## Test plan
    - [ ] Verify `npm run ts` passes (type-check)
    - [ ] Verify `npm run lint` passes
    - [ ] Verify `npm test` passes (all 661 unit tests)
    - [ ] Manual: Open Help dialog → Upload Chat Session → verify the review
    modal shows messages, codebase, logs, and system info correctly
    - [ ] Manual: Complete upload and verify the GitHub issue template
    includes `Session Schema: v2.0`
    - [ ] Manual: Download uploaded JSON and verify it contains:
    `schemaVersion`, `system`, `settings`, `app`, `chat` (with
    `aiMessagesJson` per message), `providers`, `mcpServers`, `codebase`,
    `logs`
    - [ ] Manual: Verify no API keys, OAuth tokens, or MCP env vars appear
    in uploaded data
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2488">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Medium Risk**
    > Expands what gets captured and uploaded for support sessions
    (settings/app metadata/providers/MCP and richer message data), so any
    sanitization or schema mismatch could leak data or break the support
    upload flow.
    > 
    > **Overview**
    > Switches chat-session uploads from `ChatLogsData` to a new versioned
    `SessionDebugBundle` (`SESSION_DEBUG_SCHEMA_VERSION = 2`) and updates
    the IPC contract/exports accordingly.
    > 
    > The main-process handler now assembles a comprehensive bundle
    (system/runtime info, sanitized settings snapshot, app metadata, full
    chat messages with stripped image/file blobs, custom provider/model
    summaries, MCP server configs without env/header secrets, codebase
    snapshot, and last ~1000 log lines), and `HelpDialog` is updated to
    fetch/review/upload this bundle and annotate created GitHub issues with
    `Session Schema: v2.0` (plus adds a settings section to the bug report
    template).
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    7b94199939aa6963787e8fe69716e20cd6570b7d. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    ---------
    Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
    beeaef57
名称
最后提交
最后更新
..
agent.ts 正在载入提交数据...
app.ts 正在载入提交数据...
capacitor.ts 正在载入提交数据...
chat.ts 正在载入提交数据...
context.ts 正在载入提交数据...
free_agent_quota.ts 正在载入提交数据...
github.ts 正在载入提交数据...
help.ts 正在载入提交数据...
import.ts 正在载入提交数据...
index.ts 正在载入提交数据...
language-model.ts 正在载入提交数据...
mcp.ts 正在载入提交数据...
misc.ts 正在载入提交数据...
neon.ts 正在载入提交数据...
plan.ts 正在载入提交数据...
prompts.ts 正在载入提交数据...
proposals.ts 正在载入提交数据...
security.ts 正在载入提交数据...
settings.ts 正在载入提交数据...
supabase.ts 正在载入提交数据...
system.ts 正在载入提交数据...
templates.ts 正在载入提交数据...
upgrade.ts 正在载入提交数据...
vercel.ts 正在载入提交数据...
version.ts 正在载入提交数据...
visual-editing.ts 正在载入提交数据...