Skip to content

Commit

Permalink
update .gitignore and enhance prompt form logging; refine useCopy hoo…
Browse files Browse the repository at this point in the history
…k logic
  • Loading branch information
Precious-Macaulay committed Nov 12, 2024
1 parent ed1ca37 commit d68b092
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.vercel
6 changes: 4 additions & 2 deletions src/components/PromptForm/PromptForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ const PromptForm: React.FC<PromptFormProps> = () => {
} = useImageUpload({});

const { getPromptText } = usePaste((pasteText, pasteObject, event) => {
if (pasteText) setPromptText(pasteText);
console.log({ pasteObject });
// if (pasteText) {
// setPromptText(pasteText);
// }
console.log({ pasteObject, pasteText, event,promptText });
if (pasteObject) {
setControlNet(pasteObject.controlnet || controlNet);
setColorGrading(pasteObject.color_grading || colorGrading);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useCopy = () => {

// Add other allowed keys
for (const key of Object.keys(prompt) as (keyof Prompt)[]) {
if (key !== "text" && allowedKeys.has(key)) {
if (key !== "text" && allowedKeys.has(key) && prompt[key]) {
text += ` ${key}=${prompt[key]}`;
}
}
Expand Down

0 comments on commit d68b092

Please sign in to comment.