refac
Some checks are pending
Python CI / Ruff Format (3.11) (push) Waiting to run
Python CI / Ruff Format (3.12) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / merge (map[name:cuda suffix:-cuda]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:cuda126 suffix:-cuda126]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:main suffix:]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:ollama suffix:-ollama]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:slim suffix:-slim]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / notify-helm-charts (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Blocked by required conditions
Frontend Build / Unit Tests (push) Waiting to run
Frontend Build / Format & Build (push) Waiting to run

This commit is contained in:
Timothy Jaeryang Baek 2026-10-28 10:25:04 +09:00
parent 2c64ab5487
commit 7f03b6e778
3 changed files with 60 additions and 8 deletions

View file

@ -54,6 +54,7 @@ class FolderMetadataResponse(BaseModel):
class FolderNameIdResponse(BaseModel):
id: str
user_id: str
name: str
meta: Optional[FolderMetadataResponse] = None
parent_id: Optional[str] = None

View file

@ -757,10 +757,6 @@ html.high-contrast.dark .ProseMirror p.is-editor-empty:first-child::before {
@apply bg-transparent p-0 m-0 text-inherit;
}
/* this is a rough fix for the first cursor position when the first paragraph is empty */
.ProseMirror > .ProseMirror-yjs-cursor:first-child {
margin-top: 1rem;
}
/* This gives the remote user caret. The colors are automatically overwritten*/
.ProseMirror-yjs-cursor {
position: relative;
@ -773,17 +769,20 @@ html.high-contrast.dark .ProseMirror p.is-editor-empty:first-child::before {
pointer-events: none;
}
/* This renders the username above the caret */
.ProseMirror-yjs-cursor > div {
position: absolute;
top: -1.05em;
left: -1px;
.ProseMirror-yjs-cursor-label {
font-size: 0.8125rem;
line-height: 1.25;
background-color: rgb(250, 129, 0);
user-select: none;
color: white;
padding-left: 0.125rem;
padding-right: 0.125rem;
white-space: nowrap;
pointer-events: none;
}
.ProseMirror-yjs-cursor-label[data-popper-reference-hidden] {
opacity: 0;
}
body {

View file

@ -16,6 +16,7 @@ import { createNodeFromContent, Editor, Extension } from '@tiptap/core';
import { keymap } from 'prosemirror-keymap';
import { Plugin } from 'prosemirror-state';
import { tick } from 'svelte';
import tippy, { type Instance } from 'tippy.js';
const USER_COLORS = [
'#FF6B6B',
@ -116,6 +117,57 @@ export class SocketIOCollaborationProvider {
tr.setMeta('preventAutolink', true);
}
return true;
},
view: (view) => {
const labels = new Map<HTMLElement, Instance>();
const update = () => {
for (const [cursor, label] of labels) {
if (!view.dom.contains(cursor)) {
label.destroy();
labels.delete(cursor);
}
}
for (const cursor of view.dom.querySelectorAll<HTMLElement>(
'.ProseMirror-yjs-cursor'
)) {
if (!labels.has(cursor)) {
const label = cursor.querySelector('div');
if (!label) continue;
// Float above the caret without being clipped by the editor's scroll area.
label.remove();
label.className = 'ProseMirror-yjs-cursor-label';
labels.set(
cursor,
tippy(cursor, {
appendTo: () => document.body,
render: () => ({ popper: label }),
trigger: 'manual',
showOnCreate: true,
hideOnClick: false,
animation: false,
placement: 'top-start',
offset: [0, 2],
zIndex: 30,
popperOptions: {
strategy: 'fixed',
modifiers: [{ name: 'flip', enabled: false }]
}
})
);
}
labels.get(cursor)?.popperInstance?.forceUpdate();
}
};
update();
const resizeObserver = new ResizeObserver(update);
resizeObserver.observe(view.dom);
return {
update,
destroy: () => {
resizeObserver.disconnect();
labels.forEach((label) => label.destroy());
}
};
}
}),
ySyncPlugin(yXmlFragment),