analyze-assistant.ps1 902 B

12345678910111213141516171819202122232425
  1. $ErrorActionPreference = 'SilentlyContinue'
  2. [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
  3. $path = 'C:\Users\Administrator\.claude\projects\E--QMAI\282997c5-b3c4-46ce-9c34-e84e039e78a4.jsonl'
  4. $lines = Get-Content $path -Encoding UTF8
  5. $i = 0
  6. foreach ($l in $lines) {
  7. $i++
  8. if ($i -lt 936) { continue }
  9. try { $o = $l | ConvertFrom-Json } catch { continue }
  10. if ($o.type -eq 'assistant') {
  11. $c = $o.message.content
  12. if ($c -is [array]) {
  13. foreach ($p in $c) {
  14. if ($p.type -eq 'text' -and $p.text) {
  15. $t = $p.text
  16. if ($t.Length -lt 1500) {
  17. if ($t.Length -gt 400) { $t = $t.Substring(0, 400) + '...' }
  18. Write-Output ("A[" + $i + "] " + $t)
  19. Write-Output "----"
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }