diff --git a/chatgpt-suno-tampermonkey.user.js b/chatgpt-suno-tampermonkey.user.js index d70a80b..05125b3 100644 --- a/chatgpt-suno-tampermonkey.user.js +++ b/chatgpt-suno-tampermonkey.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name ChatGPT to Suno Prompt Copier // @namespace local.suno-helper -// @version 0.5.1 +// @version 0.5.2 // @description Copy structured ChatGPT song prompt versions into Suno fields. // @author local // @match https://chatgpt.com/* @@ -978,6 +978,24 @@ setStatus(statusTarget, `로컬 처리 시작: ${data.jobId || "job"} / ${data.log || "companion console 확인"}`); } + async function testCompanion(statusTarget) { + try { + const response = await fetch("http://127.0.0.1:17873/health", { + method: "GET", + cache: "no-store", + }); + const text = await response.text(); + if (!response.ok) { + setStatus(statusTarget, `연결 실패: ${response.status} ${response.statusText}`); + return; + } + const data = tryParseJson(text) || {}; + setStatus(statusTarget, `연결 OK: ${data.outputRoot || "outputRoot 확인됨"}`); + } catch (error) { + setStatus(statusTarget, `연결 실패: companion을 켜고 새로고침해줘. ${error.message || error}`); + } + } + async function bootSuno() { const body = createPanel("Suno Prompt Paste"); const slots = await readSlots(); @@ -995,6 +1013,9 @@