mihailik commited on
Commit
e7bfb69
·
1 Parent(s): 93fa727

Surface version in the document.title.

Browse files
Files changed (2) hide show
  1. package.json +2 -3
  2. src/app/boot-app.js +4 -2
package.json CHANGED
@@ -1,8 +1,7 @@
1
  {
2
  "name": "localm",
3
- "version": "1.1.10",
4
- "description": "",
5
- "main": "chat-full.js",
6
  "scripts": {
7
  "build": "esbuild src/index.js --target=es6 --bundle --sourcemap --outfile=./index.js --format=iife --external:fs --external:path --external:child_process --external:ws",
8
  "start": "npm run build -- --watch --serve=0.0.0.0:8812 --servedir=. --serve-fallback=index.html",
 
1
  {
2
  "name": "localm",
3
+ "version": "1.1.11",
4
+ "description": "Chat application",
 
5
  "scripts": {
6
  "build": "esbuild src/index.js --target=es6 --bundle --sourcemap --outfile=./index.js --format=iife --external:fs --external:path --external:child_process --external:ws",
7
  "start": "npm run build -- --watch --serve=0.0.0.0:8812 --servedir=. --serve-fallback=index.html",
src/app/boot-app.js CHANGED
@@ -6,7 +6,7 @@ import { initMilkdown } from './init-milkdown';
6
  import { outputMessage } from './output-message';
7
  import { workerConnection } from './worker-connection';
8
 
9
- import { version } from '../../package.json';
10
 
11
  /** @type {import('@milkdown/core').Editor} */
12
  export var chatLogEditor;
@@ -20,6 +20,7 @@ export async function bootApp() {
20
  const { chatLog, chatInput } = initHTML();
21
  worker = workerConnection();
22
  worker.loaded.then(async ({ env }) => {
 
23
  outputMessage(
24
  'transformers.js\n\n```JSON\n' + JSON.stringify(env, null, 2) + '\n```');
25
  const models = await worker.listModels();
@@ -33,5 +34,6 @@ export async function bootApp() {
33
  });
34
  chatLogEditor = chatLogEditorInstance;
35
  chatInputEditor = chatInputEditorInstance;
36
- outputMessage('Editor v' + version + ' loaded OK.');
 
37
  }
 
6
  import { outputMessage } from './output-message';
7
  import { workerConnection } from './worker-connection';
8
 
9
+ import { name, description, version } from '../../package.json';
10
 
11
  /** @type {import('@milkdown/core').Editor} */
12
  export var chatLogEditor;
 
20
  const { chatLog, chatInput } = initHTML();
21
  worker = workerConnection();
22
  worker.loaded.then(async ({ env }) => {
23
+ document.title = name + ' v' + version + ' t/' + env.version;
24
  outputMessage(
25
  'transformers.js\n\n```JSON\n' + JSON.stringify(env, null, 2) + '\n```');
26
  const models = await worker.listModels();
 
34
  });
35
  chatLogEditor = chatLogEditorInstance;
36
  chatInputEditor = chatInputEditorInstance;
37
+ document.title = name + ' v' + version;
38
+ outputMessage(description + ' v' + version + ' loaded OK.');
39
  }