PageSourceSearch

https://researchmonkey.ai/assets/AIWriteConclusion-C7YkFYfs.js

js researchmonkey.ai collected 2026-10-05 00:47:53 UTC 15,289 bytes, 3 lines download raw bytes

1import{j as e,u as X,o as K,q as Z,f as ee,p as se,r,d as t,B as h,b as oe,X as te,w as ne,h as v,H as ie,C as ae,t as re,s as le}from"./index-BGIpxRCe.js";import{u as ce}from"./useExtensionPrefill-C-q3DcKa.js";import{T as de}from"./textarea-DGTIVa1x.js";import{C as g,a as w,b as x,d as f,c as P}from"./card-TV1xAd85.js";import{S as ue,a as me,b as pe,c as he,d as ge}from"./select-CdLrzil7.js";import{Document as we,Paragraph as B,TextRun as xe,Packer as fe}from"./index-CqR2xNyI.js";import{F as be}from"./FileSaver.min-BSpNIw8l.js";import{R as Ce}from"./RequireSubscription-GWJGql3b.js";import{u as je}from"./ToolUsageContext-D7uGtu8K.js";import{u as ye}from"./useAuthGuard-BQMBlr7T.js";import{S as Te}from"./SendToToolButton-B469wp9x.js";import{O as Ne}from"./OpenInWriterButton-BdL6ymA1.js";import{S as ve}from"./SendToLatexButton-HEuslnM-.js";import{u as ke}from"./useLastToolOutput-Bg8dvP6M.js";import{a as Se}from"./translateOutput-hLFKl_9L.js";import{S as Ae}from"./SEO-CnltPEa-.js";import{F as Ee}from"./file-pen-Diwwxf3d.js";import{L as Ie}from"./list-checks-BM7WY04X.js";import{D as Re}from"./download-D4LQUnD_.js";import"./index-BdQq_4o_.js";import"./chevron-up-C4GcDybf.js";import"./canonicalToolName-BuwP9H-v.js";import"./useDocuments-uTKGmtlb.js";import"./DocumentPickerDialog-CTZcEu8n.js";import"./scroll-area-BdkbRTGK.js";import"./plus-CJ3GqhVm.js";import"./formatDistanceToNow-DEz_zTQm.js";import"./en-US-DaTnBiBt.js";import"./endOfMonth-BCT_hFwH.js";import"./markdownToLatex-Bf8PLJoy.js";import"./file-code-2-CteKs2fO.js";import"./crown-Brs9nPzl.js";import"./lock-7F0e5J4G.js";import"./folder-plus-Bjr1YseL.js";import"./useResearchFolders-BIZjJd7Q.js";import"./markdownToHtml-B2wnoYSI.js";const G=async(s,l)=>{if(!s||!s.trim())return s;const y=s.split(/\n\s*\n/);return(await Promise.all(y.map(T=>Se(T,l,"plain")))).join(`
2
3`)};function Le(){X();const{t:s,i18n:l}=K(),{user:y}=Z(),{requireAuth:k}=ye(),{isActive:T}=ee(),{hasFreeTrial:W,incrementUsage:q}=je(),{pendingData:i,setPendingData:j}=se(),{lastOutput:a,saveOutput:S,clearOutput:M}=ke("/ai-write-conclusion"),[c,d]=r.useState(""),[n,m]=r.useState(""),[A,E]=r.useState(!1),[U,I]=r.useState(!1),[b,p]=r.useState("");r.useEffect(()=>{a&&!n&&(m(a.conclusion),d(a.inputText),p(a.tone),t.success(s("writingTools.common.previousRestored")),a._lang&&a._lang!==l.language&&(async()=>{const o=await G(a.conclusion,l.language);m(o),S({...a,conclusion:o,_lang:l.language})})())},[a]),r.useEffect(()=>{i&&i.mode==="input"&&i.data?.content&&(d(i.data.content),j(null),t.success(s("writingTools.common.contentLoaded")))},[i,j]),r.useEffect(()=>{i&&i.mode==="output"&&i.data?.toolPath==="/ai-write-conclusion"&&(m(i.data.content),j(null),t.success("Output loaded from dashboard"))},[i,j]);const R=[{name:"Summary",title:"Summary Conclusion",definition:"Briefly restates the main points of the essay to reinforce understanding.",example:"In conclusion, the evidence clearly shows that renewable energy reduces pollution, strengthens the economy, and supports a more stable future."},{name:"Restatement",title:"Restatement Conclusion",definition:"Rephrases the thesis in fresh wording without repeating it word-for-word.",example:"Ultimately, it becomes clear that protecting our oceans is not merely desirable—it is essential for the survival of future generations."},{name:"Call-to-Action",title:"Call-to-Action Conclusion",definition:"Encourages the reader to take a specific action after reading.",example:"To create lasting change, we must begin today by reducing single-use plastics and supporting policies that protect our oceans."},{name:"Reflective",title:"Reflective Conclusion",definition:"Looks inward, showing personal insight, emotional growth, or a lesson learned.",example:"That moment taught me that courage isn't the absence of fear, but the quiet decision to move forward despite it."},{name:"Predictive",title:"Predictive Conclusion",definition:"Suggests what may happen in the future based on the information presented.",example:"If current trends continue, virtual classrooms may soon become the norm in education worldwide."},{name:"Evaluative",title:"Evaluative Conclusion",definition:"Offers a final judgment or assessment of the topic's significance or value.",example:"Given its innovative design and impressive performance, the device stands out as the most reliable option on the market."},{name:"Quotation-Based",title:"Quotation-Based Conclusion",definition:"Ends with a meaningful quote that supports the essay's central message.",example:"As Nelson Mandela once said, 'Education is the most powerful weapon you can use to change the world.' This truth remains 
3just as relevant today."},{name:"Circular",title:"Circular or Full-Circle Conclusion",definition:"Returns to the opening idea, question, or anecdote to give the essay a satisfying sense of completion.",example:"Just as I stood trembling on that stage years ago, I now stand more confident, knowing that every challenge since has shaped who I've become."},{name:"Suggestive",title:"Suggestive / Implicational Conclusion",definition:"Hints at deeper meaning or broader consequences without stating them directly.",example:"Perhaps, if we listen more carefully, we will hear what these quiet moments have been trying to teach us all along."},{name:"Counter-Argument",title:"Counter-Argument (Dialectical) Conclusion",definition:"Acknowledges a valid opposing viewpoint and then reaffirms the essay's argument or offers a nuanced synthesis.",example:"Some may argue that uniforms restrict self-expression, but this concern overlooks how students express individuality through their ideas and actions. Ultimately, the benefits of a more equal learning environment outweigh that limitation."}],z=(o=>o.trim().split(/\s+/).filter(u=>u.length>0).length)(c),_=o=>{d(o.target.value)},H=async()=>{if(k()){if(!T&&!W){t.error(s("writingTools.common.upgradeRequired")),re();return}if(!c.trim()){t.error(s("writingTools.common.fillAllFields"));return}E(!0);try{const o=await fetch("https://jgao21.app.n8n.cloud/webhook/95a638be-ae4e-4415-948d-03445c97feaf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:c,tone:b})});if(!o.ok)throw new Error("Failed to generate conclusion");const u=await o.json(),C=Array.isArray(u)?u[0]:u,L=C?.text||C?.output||C?.conclusion,N=typeof L=="string"?L.trim():"No response received";if(N&&N!=="No response received"){const D=await G(N,l.language);m(D),S({conclusion:D,inputText:c,tone:b,_lang:l.language}),t.success(s("writingTools.writeConclusion.generateSuccess"));const F=C?.input_tokens||0,O=C?.output_tokens||0;(F>0||O>0)&&await le.functions.invoke("log-n8n-ai-costs",{body:{userId:y?.id,toolName:"ai-write-conclusion",inputTokens:F,outputTokens:O,modelUsed:"openai/gpt-4.1-mini"}}),await q()}else m("No response received")}catch(o){t.error(s("writingTools.writeConclusion.generateFailed")),console.error("Error:",o)}finally{E(!1)}}},$=()=>{navigator.clipboard.writeText(n),I(!0),t.success(s("writingTools.common.copyToClipboard")),setTimeout(()=>I(!1),2e3)},J=()=>{d(s("writingTools.writeConclusion.examples.climate.inputText")),p("Call-to-Action"),t.success(s("writingTools.common.exampleLoaded"))},Q=()=>{d(s("writingTools.writeConclusion.examples.aiEducation.inputText")),p("Reflective"),t.success(s("writingTools.common.exampleLoaded"))},V=()=>{d(""),p(""),m(""),M(),t.success(s("writingTools.common.cleared"))},Y=async()=>{if(n)try{const o=new we({sections:[{properties:{},children:[new B({children:[new xe({text:"Generated Conclusion",bold:!0,size:32})],spacing:{after:400}}),new B({text:n,spacing:{after:300}})]}]}),u=await fe.toBlob(o);be.saveAs(u,"generated-conclusion.docx"),t.success(s("writingTools.common.documentDownloaded"))}catch(o){console.error("Error creating document:",o),t.error(s("writingTools.common.failedToDownload"))}};return ce("/ai-write-conclusion",o=>d(o)),e.jsx("div",{className:"min-h-screen bg-gradient-subtle py-12 px-4 overflow-x-auto",children:e.jsxs("div",{className:"container mx-auto px-4 min-w-0 lg:min-w-[1000px]",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("h1",{className:"text-4xl font-bold mb-3 text-foreground",children:s("writingTools.writeConclusion.title")}),e.jsx("p",{className:"text-lg text-muted-foreground",children:s("writingTools.writeConclusion.subtitle")})]}),e.jsxs("div",{className:"grid grid-cols-5 gap-6 mb-6 min-w-0",children:[e.jsxs("div",{className:"col-span-3 space-y-6 min-w-0",children:[e.jsxs(g,{className:"shadow-elegant",children:[e.jsx(w,{children:e.jsxs(x,{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"h-5 w-5"}),s("writingTools.writeConclusion.enterEssay")]})}),e.jsx(f,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{id:"essay-input",placeholder:s("writingTools.writeConclusion.essayPlaceholder"),value:c,onChange:_,className:"min-h-[300px] resize-none"}),e.jsx("div",{className:"flex items-center justify-end text-sm",children:e.jsx("span",{className:"text-muted-foreground",children:s("writingTools.writeConclusion.wordsLabel",{count:z})})})]})})]}),e.jsxs(g,{className:"shadow-elegant",children:[e.jsx(w,{children:e.jsxs(x,{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"h-5 w-5"}),s("writingTools.writeConclusion.selectConclusionType")]})}),e.jsx(f,{children:e.jsxs(ue,{value:b,onValueChange:p,children:[e.jsx(me,{className:"w-full",children:e.jsx(pe,{placeholder:s("writingTools.writeConclusion.conclusionTypePlaceholder")})}),e.jsx(he,{children:R.map(o=>e.jsx(ge,{value:o.name,children:s(`writingTools.writeConclusion.conclusionTypeLabels.${o.name}.title`,o.title)},o.name))})]})})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(h,{onClick:H,disabled:A||!c.trim()||!b,className:"flex-1",size:"lg",children:A?e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"mr-2 h-4 w-4 animate-spin"}),s("writingTools.writeConclusion.generating")]}):s("writingTools.writeConclusion.generateButton")}),e.jsxs(h,{onClick:V,disabled:!c&&!b&&!n,variant:"outline",size:"lg",children:[e.jsx(te,{className:"h-4 w-4"}),s("writingTools.common.clear")]})]})]}),e.jsxs(g,{className:"shadow-elegant bg-blue-50 col-span-2 sticky top-6 h-fit min-w-0",children:[e.jsx(w,{className:"pb-4",children:e.jsxs(x,{className:"flex items-center gap-2 text-xl",children:[e.jsx(ne,{className:"h-6 w-6"}),s("writingTools.writeConclusion.conclusionTypesGuide")]})}),e.jsx(f,{className:"pt-2 pb-6",children:e.jsx("div",{className:"space-y-2 text-sm max-h-[600px] overflow-y-auto pr-2",children:R.map(o=>e.jsxs("button",{className:"w-full text-left px-4 py-3 rounded-md border border-border hover:bg-primary/10 hover:border-primary transition-all",onClick:()=>p(o.name),children:[e.jsx("strong",{children:s(`writingTools.writeConclusion.conclusionTypeLabels.${o.name}.title`,o.title)}),e.jsx("p",{className:"text-muted-foreground text-xs mt-1",children:s(`writingTools.writeConclusion.conclusionTypeLabels.${o.name}.definition`,o.definition)})]},o.name))})})]})]}),!n&&e.jsxs(g,{className:"mb-6 shadow-elegant bg-gradient-to-br from-primary/5 to-background border-primary/20",children:[e.jsxs(w,{children:[e.jsxs(x,{className:"flex items-center gap-2",children:[e.jsx(v,{className:"h-5 w-5"}),s("writingTools.writeConclusion.exampleTitle")]}),e.jsx(P,{children:s("writingTools.writeConclusion.exampleSubtitle")})]}),e.jsxs(f,{className:"space-y-3",children:[e.jsx(h,{onClick:J,variant:"outline",className:"w-full",children:s("writingTools.writeConclusion.exampleClimate")}),e.jsx(h,{onClick:Q,variant:"outline",className:"w-full",children:s("writingTools.writeConclusion.exampleAI")})]})]}),!n&&e.jsxs(g,{className:"mb-6 shadow-elegant bg-gradient-to-br from-primary/10 via-primary/5 to-background border-primary/20",children:[e.jsxs(w,{className:"pb-3",children:[e.jsxs(x,{className:"flex items-center gap-2",children:[e.jsx(v,{className:"h-5 w-5"}),s("writingTools.writeConclusion.whatYoullGet")]}),e.jsx(P,{children:s("writingTools.writeConclusion.whatYoullGetSub")})]}),e.jsxs(f,{className:"space-y-3",children:[e.jsxs("div",{className:"bg-card/80 backdrop-blur-sm rounded-lg p-4 border border-border/50",children:[e.jsx("h4",{className:"font-semibold text-foreground mb-2",children:s("writingTools.writeConclusion.customTailored")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("writingTools.writeConclusion.customTailoredDesc")})]}),e.jsxs("div",{className:"bg-card/80 backdrop-blur-sm rounded-lg p-4 border border-border/50",children:[e.jsx("h4",{className:"font-semibold text-foreground mb-2",children:s("writingTools.writeConclusion.multipleStyles")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("writingTools.writeConclusion.multipleStylesDesc")})]}),e.jsxs("div",{className:"bg-card/80 backdrop-blur-sm rounded-lg p-4 border border-border/50",children:[e.jsx("h4",{className:"font-semibold text-foreground mb-2",children:s("writingTools.writeConclusion.readyToUse")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("writingTools.writeConclusion.readyToUseDesc")})]})]})]}),n&&e.jsxs(g,{className:"shadow-elegant",children:[e.jsx(w,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(x,{className:"flex items-center gap-2",children:[e.jsx(v,{className:"h-5 w-5"}),s("writingTools.writeConclusion.generatedConclusion")]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Te,{data:{type:"summary",title:"Generated Conclusion",content:n,toolName:"AI Write Me a Conclusion",toolPath:"/ai-write-conclusion"}}),e.jsx(Ne,{title:"Generated Conclusion",content:n,sourceLabel:"AI Write Me a Conclusion"}),e.jsx(ve,{content:n,title:"Conclusion"}),e.jsx(h,{variant:"outline",size:"sm",onClick:$,className:"gap-2",children:U?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"h-4 w-4"}),s("writingTools.common.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"h-4 w-4"}),s("writingTools.common.copy")]})}),e.jsxs(h,{variant:"outline",size:"sm",onClick:Y,className:"gap-2",children:[e.jsx(Re,{className:"h-4 w-4"}),s("writingTools.common.download")]})]})]})}),e.jsx(f,{children:e.jsx("div",{className:"p-4 rounded-lg bg-muted/50 border border-border/50",children:e.jsx("p",{className:"text-foreground leading-relaxed whitespace-pre-wrap",children:n})})})]})]})})}function ws(){return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{title:"Conclusion Generator — Free AI Essay Conclusion Writer | Research Monkey",description:"Generate a strong, well-structured conclusion for any essay, article, or research paper with AI.",path:"/ai-write-conclusion",keywords:"ai conclusion writer, essay conclusion generator",jsonLd:{"@context":"https://schema.org","@type":"SoftwareApplication",name:"AI Conclusion Writer for Essays & Papers | Research Monkey",description:"Generate a strong, well-structured conclusion for any essay, article, or research paper with AI.",applicationCategory:"BusinessApplication",operatingSystem:"Web",url:"https://researchmonkey.ai/ai-write-conclusion",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},publisher:{"@type":"Organization",name:"Research Monkey AI"}}}),e.jsx(Ce,{toolName:"ai-write-conclusion",toolDisplayName:"AI Write Me a Conclusion",children:e.jsx(Le,{})})]})}export{ws as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.