From a410c63333069100aee6d4e4b54196cd6accfa24 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:14:47 +0300 Subject: [PATCH 1/4] Fix ComfyUI workflow not saving --- public/scripts/extensions/stable-diffusion/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index b7f0a6496..592d2f146 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -30,7 +30,7 @@ import { SlashCommand } from '../../slash-commands/SlashCommand.js'; import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js'; import { debounce_timeout } from '../../constants.js'; import { SlashCommandEnumValue } from '../../slash-commands/SlashCommandEnumValue.js'; -import { POPUP_TYPE, callGenericPopup } from '../../popup.js'; +import { POPUP_TYPE, Popup, callGenericPopup } from '../../popup.js'; export { MODULE_NAME }; const MODULE_NAME = 'sd'; @@ -2976,7 +2976,12 @@ async function onComfyOpenWorkflowEditorClick() { }), })).json(); const editorHtml = $(await $.get('scripts/extensions/stable-diffusion/comfyWorkflowEditor.html')); - const popupResult = callGenericPopup(editorHtml, POPUP_TYPE.CONFIRM, '', { okButton: 'Save', cancelButton: 'Cancel', wide: true, large: true }); + const saveValue = (/** @type {Popup} */ _popup) => { + workflow = $('#sd_comfy_workflow_editor_workflow').val().toString(); + return true; + }; + const popup = new Popup(editorHtml, POPUP_TYPE.CONFIRM, '', { okButton: 'Save', cancelButton: 'Cancel', wide: true, large: true, onClosing: saveValue }); + const popupResult = popup.show(); const checkPlaceholders = () => { workflow = $('#sd_comfy_workflow_editor_workflow').val().toString(); $('.sd_comfy_workflow_editor_placeholder_list > li[data-placeholder]').each(function (idx) { @@ -3045,7 +3050,7 @@ async function onComfyOpenWorkflowEditorClick() { headers: getRequestHeaders(), body: JSON.stringify({ file_name: extension_settings.sd.comfy_workflow, - workflow: $('#sd_comfy_workflow_editor_workflow').val().toString(), + workflow: workflow, }), }); if (!response.ok) { From 3c1d639ce511be7d33b961854db5fc423779c99a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 12 Jul 2024 21:28:42 +0300 Subject: [PATCH 2/4] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84253f028..833bf62dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,4 +29,8 @@ - Updating GitHub Actions. - Hotfixing a critical bug. 4. Project maintainers will test and can change your code before merging. -5. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer. +5. Write at least somewhat meaningful PR descriptions. There's no "right" way to do it, but the following may help with outlining a general structure: + - What is the reason for a change? + - What did you do to achieve this? + - How would a reviewer test the change? +6. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer. From 51c30e6adfa09ac4829c9169830ad8d5d3583686 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Mon, 22 Jul 2024 00:12:03 +0200 Subject: [PATCH 3/4] Update stale/close timings in workflow --- .github/workflows/close-stale-issues.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml index 1d34a6b1c..1d4382592 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/close-stale-issues.yml @@ -16,21 +16,21 @@ jobs: uses: actions/stale@v4 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - days-before-stale: 360 - days-before-close: 5 + days-before-stale: 183 + days-before-close: 7 operations-per-run: 30 remove-stale-when-updated: true enable-statistics: true stale-issue-message: > - This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. - Otherwise it will be closed in 5 working days. + This issue has gone 6 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. + Otherwise it will be closed in 7 days. stale-pr-message: > - This PR is stale because it has been open 6 weeks with no activity. Either remove the stale label or comment below with a short update, - otherwise this PR will be closed in 5 days. + This PR is stale because it has been open 6 months with no activity. Either remove the stale label or comment below with a short update, + otherwise this PR will be closed in 7 days. close-issue-message: > - This issue was automatically closed because it has been stalled for over 1 year with no activity. + This issue was automatically closed because it has been stalled for over 6 months with no activity. close-pr-message: > - This pull request was automatically closed because it has been stalled for over 1 year with no activity. + This pull request was automatically closed because it has been stalled for over 6 months with no activity. stale-issue-label: '⚰️ Stale' close-issue-label: 'πŸ•ΈοΈ Inactive' stale-pr-label: '⚰️ Stale' @@ -44,8 +44,8 @@ jobs: uses: actions/stale@v4 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - days-before-stale: 5 - days-before-close: 3 + days-before-stale: 7 + days-before-close: 7 operations-per-run: 30 remove-stale-when-updated: true stale-issue-message: > @@ -65,7 +65,7 @@ jobs: with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} days-before-stale: 7 - days-before-close: 365 + days-before-close: 183 operations-per-run: 30 remove-stale-when-updated: true stale-issue-message: Hey SillyTavern, - Don't forget to respond! @@ -79,4 +79,4 @@ jobs: close-issue-label: 'πŸ•ΈοΈ Inactive' close-pr-label: 'πŸ•ΈοΈ Inactive' exempt-issue-labels: 'πŸ“Œ Keep Open' - exempt-pr-labels: 'πŸ“Œ Keep Open' \ No newline at end of file + exempt-pr-labels: 'πŸ“Œ Keep Open' From 968133dee9409f4a1bcadff5caff9686834b0313 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Sun, 28 Jul 2024 04:17:45 +0200 Subject: [PATCH 4/4] Fix WI reloading on slash commands --- public/scripts/world-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 70cbc069a..1de1cd419 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -893,7 +893,7 @@ function registerWorldInfoSlashCommands() { * @param {boolean} [loadIfNotSelected=false] - Indicates whether to load the file even if it's not currently selected */ function reloadEditor(file, loadIfNotSelected = false) { - const currentIndex = $('#world_editor_select').val(); + const currentIndex = Number($('#world_editor_select').val()); const selectedIndex = world_names.indexOf(file); if (selectedIndex !== -1 && (loadIfNotSelected || currentIndex === selectedIndex)) { $('#world_editor_select').val(selectedIndex).trigger('change');