yfor commited on
Commit
3acbde7
·
1 Parent(s): 2d9f547
.gitignore ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ .DS_Store
132
+ .idea
133
+ /gradio/flagged/
css/app.2b3f722c.css ADDED
@@ -0,0 +1 @@
 
 
1
+ @import url(https://cdn.jsdelivr.net/npm/tailwindcss@2.2.0/dist/tailwind.min.css);h1,p{font-family:Lato}
js/app.9e785e68.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ (function(e){function t(t){for(var n,s,c=t[0],l=t[1],u=t[2],i=0,f=[];i<c.length;i++)s=c[i],Object.prototype.hasOwnProperty.call(o,s)&&o[s]&&f.push(o[s][0]),o[s]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);d&&d(t);while(f.length)f.shift()();return a.push.apply(a,u||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],n=!0,c=1;c<r.length;c++){var l=r[c];0!==o[l]&&(n=!1)}n&&(a.splice(t--,1),e=s(s.s=r[0]))}return e}var n={},o={app:0},a=[];function s(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=e,s.c=n,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(r,n,function(t){return e[t]}.bind(null,n));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var d=l;a.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"013b":function(e,t,r){"use strict";r("9b52")},"56d7":function(e,t,r){"use strict";r.r(t);var n=r("7a23");const o={class:"flex flex-col h-screen p-2"};function a(e,t,r,a,s,c){const l=Object(n["g"])("VueLegacy");return Object(n["f"])(),Object(n["c"])("div",o,[Object(n["e"])(l)])}const s={class:"flex h-1/6"},c={class:"w-2/12 md:w-1/12"},l={class:"w-full md:flex h-5/6"},u={class:"w-full md:w-7/12 border border-gray-400",ref:"svgRef"};function d(e,t,r,o,a,d){return Object(n["f"])(),Object(n["c"])(n["a"],null,[Object(n["d"])("div",s,[Object(n["i"])(Object(n["d"])("textarea",{class:"w-10/12 md:w-11/12 h-24 border border-gray-400",placeholder:"原始内容","onUpdate:modelValue":t[0]||(t[0]=e=>a.text=e)},null,512),[[n["h"],a.text]]),Object(n["d"])("div",c,[Object(n["d"])("button",{class:"h-8 mt-16 w-full border border-gray-400 bg-blue-500 text-white",onClick:t[1]||(t[1]=e=>d.send())},"生成脑图")])]),Object(n["d"])("div",l,[Object(n["i"])(Object(n["d"])("textarea",{class:"w-full md:w-5/12 border border-gray-400 resize",placeholder:"markdown格式","onUpdate:modelValue":t[2]||(t[2]=e=>a.value=e)},null,512),[[n["h"],a.value]]),(Object(n["f"])(),Object(n["c"])("svg",u,null,512))])],64)}var i=r("1ca2"),f=r("6eff");const p=new i["a"],b="markmap: markdown 制作脑图\n1. beautiful 颜值高\n2. useful 有价值\n3. easy 易上手\n4. interactive 可交互\n",h="# markmap: markdown 制作脑图\n\n- beautiful 颜值高\n- useful 有价值\n- easy 易上手\n- interactive 可交互\n",m=new TextDecoder("utf-8");var v={name:"App",data(){return{value:h,text:b}},watch:{value:"update"},methods:{update(){const{root:e}=p.transform(this.value);this.mm.setData(e),this.mm.fit()},async send(){try{const e=[{role:"system",content:"你是制作兼容脑图的Markdown格式的专家,只返回markdown格式内容"},{role:"user",content:"请根据内容生成兼容脑图的Markdown格式,包含一级内容,和分级目录,下面是内容:\n"+this.text}],{body:t,status:r}=await fetch("https://www.13042332817.top/message",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})});if(t){const e=t.getReader();let n="";this.value="";let o=0;while(1){const{value:t,done:a}=await e.read();if(a)break;const s=m.decode(t,{stream:!0});if(200!==r){const e=JSON.parse(s),t=e.error.message?e.error.message:s;return void appendLastMessageContent(t)}n+=s,o>10&&Math.random()>.8&&(this.value=n),o++}this.value=n}}catch(e){console.log(e)}}},mounted(){this.mm=f["a"].create(this.$refs.svgRef),setTimeout(()=>{this.update()},200)}},w=r("6b0d"),y=r.n(w);const g=y()(v,[["render",d]]);var O=g,j={components:{VueLegacy:O}};r("013b");const x=y()(j,[["render",a]]);var k=x;Object(n["b"])(k).mount("#app")},"9b52":function(e,t,r){}});
2
+ //# sourceMappingURL=app.9e785e68.js.map
js/chunk-vendors.fb946b3c.js ADDED
The diff for this file is too large to render. See raw diff