deepseek wip

This commit is contained in:
2026-07-07 11:03:44 +02:00
parent 645189f21c
commit 00c67dd66a
9 changed files with 904 additions and 40 deletions
+4 -2
View File
@@ -78,6 +78,7 @@ namespace AnotherReplayReader
private Model _model = new();
private string? _cached;
private TimeIndexedPrefixSums? _cachedPrefixSums;
private ReplayFactIndex? _cachedFactIndex;
public EventDump()
{
@@ -176,6 +177,7 @@ namespace AnotherReplayReader
_textBox.Text = text;
_cached = text;
_cachedPrefixSums = prefixSums;
_cachedFactIndex = ReplayFactIndex.Build(_model.Commands, _stringHashes);
// display KB and K tokens in _tokenUsageLabel
_tokenUsageLabel.Content = $"大小: {bytesCount / 1024.0:0.00} KiB,估计Token数: {estimatedTokenCount / 1000.0:0.00} K";
}
@@ -436,7 +438,7 @@ namespace AnotherReplayReader
MessageBox.Show(this, "请先选择录像");
return;
}
if (_cached is not { } cached || _cachedPrefixSums is not { } cachedPrefixSums)
if (_cached is not { } cached || _cachedPrefixSums is not { } cachedPrefixSums || _cachedFactIndex is not { } factIndex)
{
MessageBox.Show(this, "请先生成文本");
return;
@@ -451,7 +453,7 @@ namespace AnotherReplayReader
_aiPanel.GetRequestContext = _aiSettings.GetCurrentContext!;
_aiPanel.GetPromptSettings = _aiSettings.GetPromptSettings;
await _aiPanel.StartAnalysisAsync(replay, _model.Players, cached, cachedPrefixSums, _cancellation.Token);
await _aiPanel.StartAnalysisAsync(replay, _model.Players, cached, cachedPrefixSums, factIndex, _cancellation.Token);
}
}
}