feat: streamline search results and open captured analyses
Publish GitHub Pages output / publish (push) Successful in 54s
Publish GitHub Pages output / publish (push) Successful in 54s
This commit is contained in:
@@ -24,6 +24,7 @@ type CombinationCandidate = {
|
||||
|
||||
type CombinationRequest = {
|
||||
type: 'optimize-combinations';
|
||||
resultLimit?: number;
|
||||
candidates: CombinationCandidate[];
|
||||
chart: ExactSongChart;
|
||||
};
|
||||
@@ -145,7 +146,8 @@ self.onmessage = (event: MessageEvent<OptimizeRequest | CombinationRequest | Ach
|
||||
}
|
||||
if (!best) throw new Error('정밀 분석할 조합이 없습니다.');
|
||||
rankings.sort(compareRankings);
|
||||
self.postMessage({ type: 'combination-result', ...best, rankings: rankings.slice(0, 10) });
|
||||
const resultLimit = [10, 20, 30, 50].includes(event.data.resultLimit ?? 10) ? event.data.resultLimit ?? 10 : 10;
|
||||
self.postMessage({ type: 'combination-result', ...best, rankings: rankings.slice(0, resultLimit) });
|
||||
} catch (error) {
|
||||
self.postMessage({
|
||||
type: 'error',
|
||||
|
||||
Reference in New Issue
Block a user