Skip to content

Commit 0bbb5bb

Browse files
author
guqiankun.gqk
committed
feat: add-webscm-monitor
1 parent 631af75 commit 0bbb5bb

6 files changed

Lines changed: 34 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{
9999
"publisher": "cloud-ide-ext",
100100
"name": "web-scm",
101-
"version": "0.0.7"
101+
"version": "0.0.9"
102102
},
103103
{
104104
"publisher": "alex-ext-public",

packages/acr/src/antcode-cr.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const AntcodeCR: React.FC<IAntcodeCRProps> = (props) => {
7373
new URI(window.location.href).withPath(join(props.projectPath, 'raw')).toString(),
7474
plugins: props.appConfig?.plugins,
7575
extensionMetadata: props.appConfig?.extensionMetadata,
76+
onigWasmUri: props.onigWasmUri,
7677
},
7778
{
7879
// 因为 clientApp 启动时会再次从 preference 读取并设置 language

packages/acr/src/modules/antcode-service/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ export interface IAntcodeCRProps {
119119
extensionMetadata?: IExtensionBasicMetadata[];
120120
};
121121
noteIdToReplyIdSet: Map<number | string, Set<number | string>>;
122+
// web assembly
123+
onigWasmUri?: string;
122124
}
123125

124126
export interface LsifLocation {

packages/acr/src/normalize.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ html {
88
// 使用该字体获取与vscode一致的图标表现
99
// 仅mac下可用,windows待区分
1010
// https://stackoverflow.com/questions/32660748/how-to-use-apples-new-san-francisco-font-on-a-webpage
11-
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
11+
// font-family: -apple-system, BlinkMacSystemFont, sans-serif;
1212
// 全局默认字体颜色
1313
color: var(--foreground);
1414

packages/alex/src/core/editor/editor.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ class EditorSpecialContribution
435435
editor.monacoEditor.onMouseMove(
436436
debounce((event) => {
437437
const type = event?.target?.type;
438-
console.log('type ==', type);
439438
if (
440439
type === monaco.editor.MouseTargetType.GUTTER_LINE_NUMBERS ||
441440
type === monaco.editor.MouseTargetType.GUTTER_GLYPH_MARGIN

packages/integrations/src/startup/web-scm.plugin.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { IPluginAPI } from '@alipay/alex/lib/editor';
22
import * as localforage from 'localforage';
33
import type { Uri } from '@alipay/alex';
4+
// import YuyanMonitor from '@alipay/yuyan-monitor-web';
5+
46
export const PLUGIN_ID = 'web-scm';
57

68
export interface CacheFile {
@@ -31,9 +33,16 @@ export enum Status {
3133
BOTH_DELETED,
3234
BOTH_MODIFIED,
3335
}
36+
37+
// export const yuyanMonitor = new YuyanMonitor({
38+
// yuyanId: '180020010000894003',
39+
// userId: '',
40+
// debug: true,
41+
// });
42+
3443
export const activate = ({ commands }: IPluginAPI) => {
3544
if (!localforage.supports(localforage.INDEXEDDB)) {
36-
throw new Error('SCM Not Support IndexedDB');
45+
throw new Error('[SCM] IndexedDB Not Support');
3746
}
3847

3948
// 只存储在IndexedDB
@@ -76,4 +85,23 @@ export const activate = ({ commands }: IPluginAPI) => {
7685
});
7786
return files;
7887
});
88+
89+
commands.registerCommand('web-scm.windowOpen', async (path) => {
90+
window.open(path);
91+
});
92+
93+
/*
94+
21 修改次数
95+
22 新增文件
96+
23 删除文件
97+
24 提交次数
98+
*/
99+
commands.registerCommand('web-scm.yuyanlog', (code, msg, extra) => {
100+
console.log(' >>> log', code, msg, extra);
101+
// yuyanMonitor.log({
102+
// code: code,
103+
// msg: msg,
104+
// ...extra
105+
// });
106+
});
79107
};

0 commit comments

Comments
 (0)